Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ans: [[ 1.31834028e+02][ 1.29780062e+01][ 2.64545636e+01] ...] )
- import Numpy as np
- a = np.array([[-11.4819 ],[ -3.6025 ],[ -5.1434 ],[ -4.8508 ],[ -0.9635 ],[ -3.5031 ],[ 3.1281 ],[ -3.4219 ],[ -0.1125 ],[ 1.238 ],[ 2.4585 ],[ -1.341 ],[ 2.5789 ],[ 1.1826 ],[ 4.92452],[ 1.8665 ],[ 1.0606 ],[ 4.56933],[ 2.7778 ],[ 1.6815 ],[ 3.0505 ],[ -1.497 ],[ 1.2271 ],[ 1.1386 ],[ 2.4824 ],[ -3.693 ],[ -0.673 ],[ 3.9103 ],[ -1.516 ],[ -1.944 ],[ 6.4724 ],[ 0.5928 ],[ -2.8858 ],[ 4.0423 ],[ 1.6685 ],[ 3.3711 ],[ 3.9795 ],[ 2.2135 ],[ 2.719 ],[ 0.856 ],[ 4.85033]])
- print(a)
- s = np.square(a)
- print('ans: ', s)
Add Comment
Please, Sign In to add comment