Initial transfer of larger repo from git. IF full history and branches are needed must go to github at https://github.com/DulcisL/CCUCoding.git
This commit is contained in:
commit
c09ce40be0
4048 files changed
+603256
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import numpy as np
|
||||
|
||||
a = [1, 2, 3, 4]
|
||||
x = np.array(a)
|
||||
print(type(a))
|
||||
print(type(x))
|
||||
print(a)
|
||||
print('----')
|
||||
print(x)
|
||||
|
||||
x = np.zeros((4))
|
||||
print(x)
|
||||
y= np.full((2,2),27)
|
||||
print(y)
|
||||
z=y
|
||||
|
||||
print(z)
|
||||
z[1][0]=34
|
||||
print(y)
|
||||
|
||||
print(y)
|
||||
y=y*10 # multiply every element in array by 10
|
||||
print('---')
|
||||
print(y)
|
||||
z=y+y # add two arrays together
|
||||
print('--')
|
||||
print(z)
|
||||
|
||||
print(y)
|
||||
print('---')
|
||||
print(y.shape)
|
||||
y.reshape((4))
|
||||
print('---')
|
||||
print(y)
|
||||
Reference in new issue
Block a user