3

I'm using python 3.6.7 create a 1-D array, and print its data attribute, and found it is toggle.

But why?

>>> a = np.arange(12)
>>> print(a)
[ 0  1  2  3  4  5  6  7  8  9 10 11]
>>> a.data
<memory at 0x7fef79ae8f48>
>>> a.data
<memory at 0x7fef79505048> 
>>> a.data
<memory at 0x7fef79ae8f48>
sacuL
  • 49,704
  • 8
  • 81
  • 106
FarmerLi
  • 330
  • 1
  • 3
  • 12

0 Answers0