Python中,numpy中的np.empty()函数最后返回的数组中的元素代表的是什么?

Python中,numpy中的np.empty()函数最后返回的数组中的元素代表的是什么?

随机的吧,关键是返回了一个指定形状的数组。

empty, unlike zeros, does not set the array values to zero, and may therefore be marginally faster. On the other hand, it requires the user to manually set all the values in the array, and should be used with caution.

这是文档里写的,因为不是0,所以速度快一点,但要求用户手动设定数组的值。