Skip to content

Commit

Permalink
Bug fixes to fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRyanIrish committed Mar 27, 2020
1 parent 2a812f5 commit 3062fd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/ndcollection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ are not in order.
>>> sliced_collection_reversed = my_collection_reversed[1:3, 3:8]
>>> sliced_collection_reversed.keys()
dict_keys(['observations', 'linewidths'])
>>> sliced_collection_reversed.aligned_dimesions
<Quantity [10., 20.] pix>
>>> sliced_collection_reversed.aligned_dimensions
<Quantity [2., 5.] pix>
Editing NDCollection
--------------------
Expand Down
3 changes: 2 additions & 1 deletion ndcube/ndcollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ def __init__(self, key_data_pairs, aligned_axes=None, meta=None, **kwargs):
self.meta = meta

# Convert aligned axes to required format.
sanitize_inputs = kwargs.pop("sanitize_inputs", True)
if aligned_axes is not None:
keys, data = zip(*key_data_pairs)
# Sanitize aligned axes unless hidden kwarg indicates not to.
if kwargs.pop("sanitize_inputs", True):
if sanitize_inputs:
aligned_axes = collection_utils._sanitize_aligned_axes(keys, data, aligned_axes)
else:
aligned_axes = dict(zip(keys, aligned_axes))
Expand Down

0 comments on commit 3062fd4

Please sign in to comment.