You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following example, it's not clear in the table repr that a is a dimensionless quantity as opposed to a unitless array for which units haven't been set:
In [1]: from astropy import units as u
In [2]: from astropy.table import QTable
In [3]: tab = QTable()
In [4]: tab['a'] = [1, 2, 3] * u.one
In [5]: tab
Out[5]:
<QTable length=3>
a
float64
-------
1.0
2.0
3.0
(this happens for Table` too). Maybe we should consider including (dimensionless)`` in the unit row or something similar?
The text was updated successfully, but these errors were encountered:
@astrofrog i added dimensioless property in the unit row but there was a confusion when there is a dimensionless quantity with scale != 1.0 .In the code it speacifies an output if self._scale != 1.0: return 'Unit(dimensionless with a scale of {})'.format(self._scale).
So i decided to keep that as it is because i thought it was an important message and putting it into the table header will generally make the plaintext render of the table useless. If you like to suggest any other way for that kindly let me know.
here in wrote a PR
Harshil-C
added a commit
to Harshil-C/astropy
that referenced
this issue
Jan 24, 2020
In the following example, it's not clear in the table repr that
a
is a dimensionless quantity as opposed to a unitless array for which units haven't been set:(this happens for
Table` too). Maybe we should consider including
(dimensionless)`` in the unit row or something similar?The text was updated successfully, but these errors were encountered: