Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
DhanyaSelvaraj authored Apr 16, 2018
1 parent 6eb9d3c commit f6bdf25
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Basics of Numpy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import numpy as np

x=np.array([1,2,3,4])

x
Out[3]: array([1, 2, 3, 4])

x=np.array([3.5,1,2,3,4])

x
Out[5]: array([3.5, 1. , 2. , 3. , 4. ])

x=np.array([1,2,3,4],dtype=float)

x
Out[7]: array([1., 2., 3., 4.])

x=np.ones((3,3),dtype=int)

x
Out[9]:
array([[1, 1, 1],
[1, 1, 1],
[1, 1, 1]])

x=np.zeros((3,3),dtype=int)

x
Out[11]:
array([[0, 0, 0],
[0, 0, 0],
[0, 0, 0]])

x=np.full((3,3),3)

x
Out[13]:
array([[3, 3, 3],
[3, 3, 3],
[3, 3, 3]])

0 comments on commit f6bdf25

Please sign in to comment.