sunpy / ndcube

A base package for multi-dimensional contiguous and non-contiguous coordinate-aware arrays. "Maintainers": @danryanirish & @Cadair
http://docs.sunpy.org/projects/ndcube/
BSD 2-Clause "Simplified" License
44 stars 47 forks source link

Test helper errors on sunraster with dev version of ndcube #730

Open nabobalis opened 3 months ago

nabobalis commented 3 months ago

Describe the bug

test_input = {'exposure time': <Quantity [2., 2.] s>}, expected_output = {'exposure time': <Quantity [2., 2.] s>}

    def assert_metas_equal(test_input, expected_output):
        if not (test_input is None and expected_output is None):
            assert test_input.keys() == expected_output.keys()
            for key in list(test_input.keys()):
>               assert test_input[key] == expected_output[key]
E               ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Need to account for a key being an array.