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
- import logging
- logging.basicConfig(level=1) # be very verbose with logging for now
- def evaluate(function, x):
- return function(x)
- times = []
- def mintime(): return times[0]
- def maxtime(): return times[-1]
- """
- sens2.csv sample:
- 1328565067.000,0.0963890795246276,0.0245045248243853
- 1328565067.050,0.227296347215609,0.0835679411703579
- 1328565067.100,0.240972698811569,0.0612613120609633
- """
- if __name__ == '__main__':
- input_ = file('/Users/hdiwan/Dropbox/iMeee/data/sens2.csv', 'r')
- lines = input_.read()
- d1 = d2 = {}
- lineNumber = 0
- for line in lines.split(u'\n'):
- lineNumber = lineNumber + 1
- part = line.split(u',')
- try:
- xval = float(part[1])
- yval = float(part[2])
- d1 = {part[0] : xval}
- d2 = {part[0] : yval}
- times.append(part[0])
- except IndexError:
- # logging.log(5, u'{'+unicode(lineNumber)+u'}: '+line)
- continue
- from scipy import interpolate,integrate
- t = interpolate.UnivariateSpline(d1.values(), d2.values())
- print integrate.dblquad(evaluate, min(times), max(times), mintime, maxtime)
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.
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.