这一句中为什么必须要用asnumpy,这个作用是什么,为什么不能直接画图

set_figsize()
plt.scatter(features[:, 1].asnumpy(), labels.asnumpy(),1)

https://mxnet.apache.org/versions/1.7.0/api/python/docs/tutorials/packages/ndarray/gotchas_numpy_in_mxnet.html

How to minimize the impact of blocking calls

There are cases, when you have to use either .asnumpy() or .asscalar() methods. As it is explained before, this will force Apache MXNet to block the execution until the result can be retrieved. One common use case is printing a metric or a value of a loss function.

我能理解的是plt只识别numpy。。。ndarray别的理解不太了,谢谢你!