other changes
This commit is contained in:
14
testy/numpylistmutability.py
Normal file
14
testy/numpylistmutability.py
Normal file
@ -0,0 +1,14 @@
|
||||
import numpy as np
|
||||
from array import array
|
||||
|
||||
# Original list
|
||||
puvodni = array('i', [1, 2, 3, 4])
|
||||
|
||||
# Create a NumPy array using the original list
|
||||
numpied = np.array(puvodni)
|
||||
|
||||
# Now, if puvodni changes, numpied will be updated as well
|
||||
puvodni.append(5)
|
||||
|
||||
# Check the updated numpied array
|
||||
print(numpied)
|
||||
Reference in New Issue
Block a user