Message178995
For the sake of internet archives, the following could be included in the FAQ you referred to:
http://www.scipy.org/Cookbook/BuildingArrays
>>> import numpy as np
>>> a=np.array(5*[False],bool)
>>> a
array([False, False, False, False, False], dtype=bool)
>>> a[4]=1
>>> a
array([False, False, False, False, True], dtype=bool)
>>>
But thanks for the link, it helped me at that time. |
|
Date |
User |
Action |
Args |
2013-01-03 23:11:06 | mmokrejs | set | recipients:
+ mmokrejs, amaury.forgeotdarc |
2013-01-03 23:11:05 | mmokrejs | set | messageid: <1357254665.86.0.306352453843.issue15416@psf.upfronthosting.co.za> |
2013-01-03 23:11:05 | mmokrejs | link | issue15416 messages |
2013-01-03 23:11:05 | mmokrejs | create | |
|