我有一个Astropy CartesianRepresentation对象,看起来像这样: <CartesianRepresentation (x, y, z) in km
[( 4082.71516205我想把它转换成一个NumPy ndarray,这样单个元素就可以被索引了。有没有办法做到这一点?
我使用Table.read_where('condition')查询表,并为符合我的条件的每一行提供了一个numpy.void元素列表。有没有办法把这些行的列表变成Astropy表呢?下面是我尝试将其转换为Astropy表的代码: import tablesimport numpy as np
Data = tables.open_fileEach numpy.void represents a ro
我刚刚更新了Astropy到3.1.2版本。/body-local.py", line 3, in <module> File "/home/jimc/.local/lib/python3.6/site-packages/astropy/__init__.py", line 121, in <module>
Astropy坐标已经被证明是一种非常快速的在ICRS和银河帧之间转换的方法。我的问题是如何将SkyCoord数组写入文本文件,可能使用Numpy数组或Pandas DataFrame作为中介。我探索过的一种可能的方法是为坐标创建一个Astropy QTable (将它们作为字符串添加),但这很慢,需要额外的处理才能分离和清理坐标字符串。import pandas as pd
from astropy import unit
我试图将astropy Angles的对象实例添加到NumPy数组中,并得到一个错误:
ValueError: setting an array element with a sequence.而且,由于numpy数组需要初始化到特定的维度,我如何找到这个对象的“长度”,以便将它们加载到numpy数组中?