Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

Paste Description for SciPy problem

dfitpack.error: (m>k) failed for hidden m: fpcurf0:m=1

SciPy problem
Thursday, February 9th, 2012 at 8:54:57pm MST 

  1. import logging
  2. logging.basicConfig(level=1) # be very verbose with logging for now
  3.  
  4. def evaluate(function, x):
  5.     return function(x)
  6.  
  7. times = []
  8.  
  9. def mintime(): return times[0]
  10. def maxtime(): return times[-1]
  11.  
  12. """
  13. sens2.csv sample:
  14. 1328565067.000,0.0963890795246276,0.0245045248243853
  15. 1328565067.050,0.227296347215609,0.0835679411703579
  16. 1328565067.100,0.240972698811569,0.0612613120609633
  17. """
  18. if __name__ == '__main__':
  19.     input_ = file('/Users/hdiwan/Dropbox/iMeee/data/sens2.csv', 'r')
  20.     lines = input_.read()
  21.     d1 = d2 = {}
  22.     lineNumber = 0
  23.     for line in lines.split(u'\n'):
  24.         lineNumber = lineNumber + 1
  25.         part = line.split(u',')
  26.         try:
  27.             xval = float(part[1])
  28.             yval = float(part[2])
  29.             d1 = {part[0] : xval}
  30.             d2 = {part[0] : yval}
  31.             times.append(part[0])
  32.         except IndexError:
  33.     #       logging.log(5, u'{'+unicode(lineNumber)+u'}: '+line)
  34.             continue
  35.     from scipy import interpolate,integrate
  36.     t = interpolate.UnivariateSpline(d1.values(), d2.values())
  37.     print integrate.dblquad(evaluate, min(times), max(times), mintime, maxtime)

Paste Details

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right worth-right
fantasy-obligation