On Wed, 2013-05-08 at 10:13 +0800, Sudheer Joseph wrote:
> However I get below error. Please tell me if any thing I am missing.
>
>
> file "read_reg_grd.py", line 22, in <module>
> np.savetxt("file.txt", IL.reshape(-1,5), fmt='%5d', delimiter=',')
> AttributeError: 'list' object has no attribute 'reshape'
IL is a list, not a numpy array. You can either convert the list to an
array after you've filled it, using np.array(IL), or you can
pre-allocate the array and fill it directly in the loop.
Cheers,
Henry
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion