Python Scripting, photos and quotes.
>> xx = zeros([2,2], Float) # Recall 2nd parameter to zeros is the type >>> print xx [[0 0] [0 0]] >>> xx[0][0] = 5.3 >>> print xx [[ 5.3 0. ] [ 0. 0. ]] >>> xx[1][0] = 4 >>> xx[0][1] = -10 >>> xx[1][1] = 16 >>> print xx [[ 5.3 -10. ] [ 4. 16. ]] >>> print xx[1][0] 4.0
Post a Comment
1 comment:
>> xx = zeros([2,2], Float) # Recall 2nd parameter to zeros is the type
>>> print xx
[[0 0]
[0 0]]
>>> xx[0][0] = 5.3
>>> print xx
[[ 5.3 0. ]
[ 0. 0. ]]
>>> xx[1][0] = 4
>>> xx[0][1] = -10
>>> xx[1][1] = 16
>>> print xx
[[ 5.3 -10. ]
[ 4. 16. ]]
>>> print xx[1][0]
4.0
Post a Comment