向结构化的numpy数组添加字段(2) [英] Adding a field to a structured numpy array (2)

查看:98
本文介绍了向结构化的numpy数组添加字段(2)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有关此主题的问题(将字段添加到结构化numpy数组的最简洁方法),请参阅

I know there was already a question about this topic (cleanest way to add a field to a structured numpy array), see

将字段添加到结构化numpy数组

但是我对那里给出的答案有疑问...

but I have a question about the answer given there ...

如果您使用的是numpy 1.3,那么还有numpy.lib.recfunctions.append_fields()

If you're using numpy 1.3, there's also numpy.lib.recfunctions.append_fields()

我仍然有numpy 1.3,但它无法识别此功能,并且在numpy的文档中也没有找到任何有关此功能的信息.函数发生了什么?还有另一个功能可以做到这一点吗?

I still have numpy 1.3, but it doesn't recognise this function, and I also didn't find anything about it in the documentation of numpy. What happened with the function? Is there another function that can do the same?

推荐答案

至于有关recfunctions的文档,这里是:

As far as documentation for the recfunctions, here it is: http://pyopengl.sourceforge.net/pydoc/numpy.lib.recfunctions.html

如果在阅读后仍无法弄清,请提供一些代码示例(例如,您是否导入了numpy.lib.recfunctions?)以及错误消息或不良结果,因此我们可以确定如何解决它.

If you can't figure it out after reading that, then please provide some code samples (for instance, did you import numpy.lib.recfunctions?) and an error message or undesired result, so we can determine how to fix it.

这篇关于向结构化的numpy数组添加字段(2)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆