Ticket #303 (closed defect: fixed)
extension type member of type numpy.float_t looses its value
| Reported by: | NNemec | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | 0.11.3 |
| Component: | Code Generation | Keywords: | numerics |
| Cc: | dagss@… |
Description (last modified by dagss) (diff)
The numpy.float_t type is not handled correctly. The snippet
cdef class myclass:
cdef readonly:
double var_d
numpy.float_t var_nf
def __init__(self):
self.var_d = 42.0
self.var_nf = 42.0
c = myclass()
print "double (correctly given as 42.0):",c.var_d
print "numpy.float_t (should be 42.0):",c.var_nf
compiles fine, but prints
double (correctly given as 42.0): 42.0
numpy.float_t (should be 42.0): 0.0
so the value of var_nf seems to be lost somewhere on the way.
Change History
Note: See
TracTickets for help on using
tickets.
