gpt4 book ai didi

python - 带下划线的 NumPy 类型 : `int_` , `float_` 等

转载 作者:太空狗 更新时间:2023-10-29 20:19:15 24 4
gpt4 key购买 nike

int_float_等中下划线后缀的意义是什么?

最佳答案

来自 Guide to Numpy 的第 21 页通过 TE Oliphant:

Names for the data types that would clash with standard Python object names are followed by a trailing underscore, ’ ’. These data types are so named because they use the same underlying precision as the corresponding Python data types.

. . .

The array types bool_, int_, complex_, float_, object_, unicode_, and str_ are enhanced-scalars. They are very similar to the standard Python types (without the trailing underscore) and inherit from them (except for bool_ and object_). They can be used in place of the standard Python types whenever desired. Whenever a data type is required, as an argument, the standard Python types are recognized as well.

关于python - 带下划线的 NumPy 类型 : `int_` , `float_` 等,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6205020/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com