@@ -79,19 +79,23 @@ def _create_axes(self, name, values, transformation_type_key, transformation_opt
79
79
for axis_name in final_axis_names :
80
80
self .fake_axes .append (axis_name )
81
81
# if axis does not yet exist, create it
82
-
83
- # first need to change the values so that we have right type
84
- values = transformation .change_val_type (axis_name , values )
85
- if self ._axes is None or axis_name not in self ._axes .keys ():
86
- DatacubeAxis .create_standard (axis_name , values , self )
87
- # add transformation tag to axis, as well as transformation options for later
88
- setattr (self ._axes [axis_name ], has_transform [transformation_type_key .name ], True ) # where has_transform is
89
- # a factory inside datacube_transformations to set the has_transform, is_cyclic etc axis properties
90
- # add the specific transformation handled here to the relevant axes
91
- # Modify the axis to update with the tag
92
-
93
- if transformation not in self ._axes [axis_name ].transformations : # Avoids duplicates being stored
94
- self ._axes [axis_name ].transformations .append (transformation )
82
+ if transformation .change_val_type (axis_name , values ) is not None :
83
+ # first need to change the values so that we have right type
84
+ values = transformation .change_val_type (axis_name , values )
85
+ if self ._axes is None or axis_name not in self ._axes .keys ():
86
+ DatacubeAxis .create_standard (axis_name , values , self )
87
+ # add transformation tag to axis, as well as transformation options for later
88
+ setattr (self ._axes [axis_name ], has_transform [transformation_type_key .name ], True )
89
+ # where has_transform is a factory inside datacube_transformations to set the has_transform, is_cyclic
90
+ # etc axis properties add the specific transformation handled here to the relevant axes
91
+ # Modify the axis to update with the tag
92
+
93
+ if transformation not in self ._axes [axis_name ].transformations : # Avoids duplicates being stored
94
+ self ._axes [axis_name ].transformations .append (transformation )
95
+ else :
96
+ # Means we have an unsliceable axis since we couln't transform values to desired type
97
+ if self ._axes is None or axis_name not in self ._axes .keys ():
98
+ DatacubeAxis .create_standard (axis_name , values , self )
95
99
96
100
def _add_all_transformation_axes (self , options , name , values ):
97
101
for transformation_type_key in options .transformations :
0 commit comments