File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ class MyJavaClasses(JavaClasses):
30
30
significantly easier and more readable.
31
31
"""
32
32
33
+ @JavaClasses .java_import
34
+ def Double (self ):
35
+ return "java.lang.Double"
36
+
33
37
@JavaClasses .java_import
34
38
def Throwable (self ):
35
39
return "java.lang.Throwable"
Original file line number Diff line number Diff line change @@ -184,8 +184,6 @@ def _assign_axes(xarr: xr.DataArray):
184
184
:param xarr: xarray that holds the units
185
185
:return: A list of ImageJ Axis with the specified origin and scale
186
186
"""
187
- Double = sj .jimport ("java.lang.Double" )
188
-
189
187
axes = ["" ] * len (xarr .dims )
190
188
191
189
# try to get EnumeratedAxis, if not then default to LinearAxis in the loop
@@ -198,14 +196,14 @@ def _assign_axes(xarr: xr.DataArray):
198
196
coords_arr = xarr .coords [dim ].to_numpy ()
199
197
200
198
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 ]]
202
200
else :
203
201
_logger .warning (
204
202
f"The { ax_type .label } axis is non-numeric and is translated "
205
203
"to a linear index."
206
204
)
207
205
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 ]))
209
207
]
210
208
211
209
# 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