In the following code
a = numpy.array([1,2,3])
b = a[0]
b.fill(5)
print(b)
print(a)
No error is raised. However, it prints 1 for b. I expected 5. Why this?
In the following code
a = numpy.array([1,2,3])
b = a[0]
b.fill(5)
print(b)
print(a)
No error is raised. However, it prints 1 for b. I expected 5. Why this?
Copyright © 2021 Jogjafile Inc.