Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #122 on branch v0.4.x (fix CDIPS parsing support (column filled with strings)) #123

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
0.4.1 (unreleased)
------------------

* Fixes CDIPS support by handling columns filled with strings with empty units. [#122]

0.4.0 (06-11-2024)
------------------

Expand Down
8 changes: 7 additions & 1 deletion lcviz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ def to_object(self, data_or_subset):
if len(values) and isinstance(values[0], Time):
values = Time(values.base)
elif hasattr(component, 'units') and component.units != "None":
values = u.Quantity(values, component.units)
try:
values = u.Quantity(values, component.units)
except TypeError:
if component.units != "":
raise
# values could have been an array of strings with units ""
values = values

if component_id.label not in names:
columns.append(values)
Expand Down
Loading