Ejemplo n.º 1
0
 def test_real_set_lazy(self):
     # Setting new lazy data does not make a copy.
     ancill_var = AncillaryVariable(self.data_real)
     new_data = self.data_lazy + 102.3
     ancill_var.data = new_data
     result = ancill_var.core_data()
     self.assertEqualLazyArraysAndDtypes(result, new_data)
Ejemplo n.º 2
0
 def test_real_data(self):
     ancill_var = AncillaryVariable(self.data_real)
     result = ancill_var.core_data()
     self.assertArraysShareData(
         result,
         self.data_real,
         "core_data() do not share data with the internal array.",
     )
Ejemplo n.º 3
0
 def test_real_set_real(self):
     # Setting new real data does not make a copy.
     ancill_var = AncillaryVariable(self.data_real)
     new_data = self.data_real + 102.3
     ancill_var.data = new_data
     result = ancill_var.core_data()
     self.assertArraysShareData(
         result, new_data,
         'Data values do not share data with the assigned array.')
Ejemplo n.º 4
0
 def test_lazy_points_realise(self):
     ancill_var = AncillaryVariable(self.data_lazy)
     real_data = ancill_var.data
     result = ancill_var.core_data()
     self.assertEqualRealArraysAndDtypes(result, real_data)
Ejemplo n.º 5
0
 def test_lazy_data(self):
     ancill_var = AncillaryVariable(self.data_lazy)
     result = ancill_var.core_data()
     self.assertEqualLazyArraysAndDtypes(result, self.data_lazy)