Answers for "numpy add"

0

numpy add

>>> np.add(1.0, 4.0)
5.0
>>> x1 = np.arange(9.0).reshape((3, 3))
>>> x2 = np.arange(3.0)
>>> np.add(x1, x2)
array([[  0.,   2.,   4.],
       [  3.,   5.,   7.],
       [  6.,   8.,  10.]])
Posted by: Guest on September-18-2021
-2

numpy python add array

x1 = [1, 2]
x2 = [1, 2]
print(np.add(x1, x2))
# [2, 4]
Posted by: Guest on September-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language