Skip to main content

All Questions

4 votes
2 answers
413 views

NumPy - fastest lazy lexicographical comparing of 1D arrays

I have two NumPy 1D arrays a and b. How do I compare them lexicographically? Meaning that 1D arrays should be compared same way as Python compares tuples. Main thing is that this should be done lazily,...
Arty's user avatar
  • 16.8k
16 votes
2 answers
7k views

Reconcile np.fromiter and multidimensional arrays in Python

I love using np.fromiter from numpy because it is a resource-lazy way to build np.array objects. However, it seems like it doesn't support multidimensional arrays, which are quite useful as well. ...
iago-lito's user avatar
  • 3,246
8 votes
1 answer
7k views

Python lazy evaluation numpy ndarray

I have a large 2D array that I would like to declare once, and change occasionnaly only some values depending on a parameter, without traversing the whole array. To build this array, I have ...
Damlatien's user avatar