Created
October 30, 2015 10:15
-
-
Save PiotrZakrzewski/23a459f43e6adec2d18c to your computer and use it in GitHub Desktop.
Vector comprehension in python numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numpy.fromiter((<some_func>(x) for x in <something>),<dtype>,<size of something>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from here http://stackoverflow.com/questions/14372613/efficient-creation-of-numpy-arrays-from-list-comprehension-and-in-general