JPype 从 JArray 获取 numpy 数组
JPype get numpy array from JArray
是否可以从字节的 JArray 中获取 numpy 数组?我需要访问原始字节,当我尝试时:
numpy.frombuffer(jpype_object)
它保持:
AttributeError: 'byte[]' object has no attribute '__buffer__'
看起来数组切片符合我的要求:
是否可以从字节的 JArray 中获取 numpy 数组?我需要访问原始字节,当我尝试时:
numpy.frombuffer(jpype_object)
它保持:
AttributeError: 'byte[]' object has no attribute '__buffer__'
看起来数组切片符合我的要求: