I want to remove the whole numpy array. For instance, if I make array A
like
A = np.zeros((2,3))
I want to remove the whole array A
and want to reuse the name 'A' in other purpose.
Are there any codes (functions) to delete the array?
I want to remove the whole numpy array. For instance, if I make array A
like
A = np.zeros((2,3))
I want to remove the whole array A
and want to reuse the name 'A' in other purpose.
Are there any codes (functions) to delete the array?
I want to remove the whole array A
del A
want to reuse the name 'A' in other purpose.
A = whateverElse # associate A with whateverElse, so simple :o)
Just assign A to something else. As @juanpa.arrivillaga said, Python will take care of the now "un-referenced" array and do any garbage collection itself.
e.g. A = "new string"