convert_numpy#
- astropy.io.ascii.convert_numpy(numpy_type)[源代码]#
返回一个元组,该元组包含将列表转换为numpy数组的函数,以及由转换函数生成的类型。
- 参数:
- numpy_type :
numpy
数据类型numpy数据类型 返回的数组所需的numpy类型
converter
. 必须是有效的 numpy type (例如。,纽比.uint, 数字输入8, 数字.int64, 数字浮点数64)或者由numpy类型覆盖的python类型(例如int、float、str、bool)。
- numpy_type :
- 返回:
- converter :
callable()
Python:Callable() converter
是一个函数,它接受列表并将其转换为类型为numpy_type
。- converter_type类型
converter_type
跟踪转换器函数生成的泛型数据类型。
- converter :
- 加薪:
ValueError
由提高
converter
如果列表元素无法转换为所需的类型。