|
|
|
|
|
by andreasvc
4258 days ago
|
|
I think if you would use memory views you could have the benefits of both fast low level access, plus the vectorized numpy functions on the other hand (I'm thinking here of initializing the arrays with a single call to numpy.random.uniform). With multi-dimensional arrays it's definitely better than plain pointers. |
|
Maybe I just never learned numpy. But I had to go and look up what that stuff did, and it wasn't obvious to me what the data types of those arrays would be. So, I like the C-style initialization actually --- just because it's more obvious to me.