File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,11 +244,11 @@ def evaluate(self, *inputs):
244244 bounds_error = self .bounds_error ,
245245 fill_value = self .fill_value ,
246246 )
247-
247+
248248 # return_units not respected when points has no units
249249 if isinstance (self .lookup_table , u .Quantity ) and not isinstance (
250- self . points [ 0 ] , u .Quantity
251- ):
250+ result , u .Quantity
251+ ):
252252 result = result * self .lookup_table .unit
253253
254254 if self .n_outputs == 1 :
Original file line number Diff line number Diff line change @@ -729,6 +729,12 @@ def test_tabular_interp_1d():
729729 assert_quantity_allclose (model (xnew .to (u .nm )), ans1 )
730730 assert model .bounding_box == (0 * u .nm , 4 * u .nm )
731731
732+ # Test with no units on points.
733+ model = LookupTable (points = points , lookup_table = values * u .nJy )
734+ assert_quantity_allclose (model (xnew ), ans1 )
735+ assert_quantity_allclose (model (xnew .to (u .nm )), ans1 )
736+ assert model .bounding_box == (0 * u .nm , 4 * u .nm )
737+
732738 # Test fill value unit conversion and unitless input on table with unit
733739 model = LookupTable (
734740 [1 , 2 , 3 ],
You can’t perform that action at this time.
0 commit comments