Esempio n. 1
0
 def test_scalar_input(self):
     # Regression test for gh-9799, where astrom0 being a void
     # caused a TypeError, as it was trying to change it in-place.
     assert type(self.astrom_scalar) is np.void
     astrom = erfa.aper13(self.utc2mjd, self.mjd_scalar, self.astrom_scalar)
     assert astrom is not self.astrom_scalar
     assert type(astrom) is np.void
Esempio n. 2
0
 def test_array_input(self):
     # Trying to fix gh-9799, it became clear that doing things in-place was
     # a bad idea generally (and didn't work), so also for array input we
     # now return a copy.
     assert type(self.astrom_array) is np.ndarray
     astrom = erfa.aper13(self.utc2mjd, self.mjd_array, self.astrom_array)
     assert astrom is not self.astrom_array
     assert type(astrom) is np.ndarray