Hi all, I'm testing some computations with float96 at the moment and right now I have problems with polyfit raising a KeyError for the keycode 'g', which is floatxx with xx>64.
I am getting a KeyError using polyfit on some float96 values. The used
Routines seem to know nothing about this type.
My main question is: have I missed something? Shouldn't this type be used?
Below is a more detailed descripton.
Thanks in advance,
Jan
----------------------------------------------------------------------------
In file numpy/linalg/linalg.py, the following definitions at lines 26ff seem
to be the offending ones:
# Helper routines
_array_kind = {'i':0, 'l': 0, 'q': 0, 'f': 0, 'd': 0, 'F': 1, 'D': 1}
_array_precision = {'i': 1, 'l': 1, 'q': 1, 'f': 0, 'd': 1, 'F': 0,
'D': 1}
_array_type = [['f', 'd'], ['F', 'D']]
Here the new typecodes are missing. I tried
# Helper routines
_array_kind = {'i':0, 'l': 0, 'q': 0, 'f': 0, 'd': 0, 'g': '0', 'F': 1,
'D':1, 'G':1}
_array_precision = {'i': 1, 'l': 1, 'q': 1, 'f': 0, 'd': 1, 'g': 1,
'F': 0, 'D': 1, 'G': 1}
_array_type = [['f', 'd', 'g'], ['F', 'D', 'G']]
which gets me a step further to a TypeError:
File "lib/python2.3/site-packages/numpy/linalg/linalg.py", line 454, in
lstsq
bstar[:b.shape[0],:n_rhs] = b.copy()
TypeError: array cannot be safely cast to required type
(Question: Why only one typecode for a type which varies in bitlength on
different platforms? On Opteron CPU's I've seen float128 with 'g'?)
pgp3Nctx4bfh4.pgp
Description: PGP signature
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Numpy-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/numpy-discussion
