counting unique numpy subarrays
duncan smith
duncan at invalid.invalid
Fri Dec 4 19:13:53 EST 2015
On 04/12/15 22:36, Albert-Jan Roskam wrote:
> Hi
>
> (Sorry for topposting)
>
> numpy.ravel is faster than numpy.flatten (no copy)
> numpy.empty is faster than numpy.zeros
> numpy.fromiter might be useful to avoid the loop (just a hunch)
>
> Albert-Jan
>
Thanks, I'd forgotten the difference between numpy. flatten and
numpy.ravel. I wasn't even aware of numpy.empty.
Duncan
More information about the Python-list
mailing list