[Numpy-discussion] minor improvment to ones
Neal Becker
ndbecker2 at gmail.com
Fri Jan 30 09:22:46 EST 2009
Right now there are 2 options to create an array of constant value:
1) empty (size); fill (val)
2) ones (size) * val
1 has disadvantage of not being an expression, so can't be an arg to a
function call. Also probably slower than create+fill @ same time
2 is probably slower than create+fill @ same time
Now what would be _really_ cool is a special array type that would represent
a constant array without wasting memory. boost::ublas, for example, has
this feature.
More information about the NumPy-Discussion
mailing list