File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ class MyJavaClasses(JavaClasses):
3030 significantly easier and more readable.
3131 """
3232
33+ @JavaClasses .java_import
34+ def Double (self ):
35+ return "java.lang.Double"
36+
3337 @JavaClasses .java_import
3438 def Throwable (self ):
3539 return "java.lang.Throwable"
Original file line number Diff line number Diff line change @@ -184,8 +184,6 @@ def _assign_axes(xarr: xr.DataArray):
184184 :param xarr: xarray that holds the units
185185 :return: A list of ImageJ Axis with the specified origin and scale
186186 """
187- Double = sj .jimport ("java.lang.Double" )
188-
189187 axes = ["" ] * len (xarr .dims )
190188
191189 # try to get EnumeratedAxis, if not then default to LinearAxis in the loop
@@ -198,14 +196,14 @@ def _assign_axes(xarr: xr.DataArray):
198196 coords_arr = xarr .coords [dim ].to_numpy ()
199197
200198 if _is_numeric_scale (coords_arr ):
201- doub_coords = [Double (np .double (x )) for x in xarr .coords [dim ]]
199+ doub_coords = [jc . Double (np .double (x )) for x in xarr .coords [dim ]]
202200 else :
203201 _logger .warning (
204202 f"The { ax_type .label } axis is non-numeric and is translated "
205203 "to a linear index."
206204 )
207205 doub_coords = [
208- Double (np .double (x )) for x in np .arange (len (xarr .coords [dim ]))
206+ jc . Double (np .double (x )) for x in np .arange (len (xarr .coords [dim ]))
209207 ]
210208
211209 # EnumeratedAxis is a new axis made for xarray, so is only present in
You can’t perform that action at this time.
0 commit comments