2024-04-25 22:15:57 发布
网友
为什么python中的numpy的实现者决定为np.random.随机作为逗号分隔的整数,但用于np.零作为形状的元组? 请解释这个设计选择。 谢谢
NumPy包含一些方便的函数for users with a background from Matlab。因此NumPy将函数命名为与Matlab等效的函数,并使用 similar function call signature。你知道吗
根据the docs
[randn] is a convenience function. If you want an interface that takes a tuple as the first argument, use numpy.random.standard_normal instead.
numpy.random.standard_normal
^{}是equivalent到^{}但是使用 更多本机NumPy接口(使用size参数)。你知道吗
size
NumPy包含一些方便的函数for users with a background from Matlab。因此NumPy将函数命名为与Matlab等效的函数,并使用 similar function call signature。你知道吗
根据the docs
^{} 是equivalent到^{} 但是使用
更多本机NumPy接口(使用
size
参数)。你知道吗相关问题 更多 >
编程相关推荐