Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.509 kb
import floatint.floatint as ff
import numpy as np
# Setting using array is hard because
# The parser doesn't stop at tuples always
# So, the setitem code will be called with scalars on the
# wrong shaped array.
# But we can get a view as an ndarray of the given type:
g = np.array([1,2,3,4,5,6,7,8]).view(ff.floatint_type)
# Now, the elements will be the scalar type associated
# with the ndarray.
print g[0]
print type(g[1])
# Now, you need to register ufuncs and more arrfuncs to do useful things...
Jump to Line
Something went wrong with that request. Please try again.