Error message
Call add_uv_lagerloef()
function in pyEddyTracker==3.5.0
reports an error:
numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<built-in function sub>) found for signature:
>>> sub(UniTuple(int64 x 2), float64)
There are 12 candidate implementations:
- Of which 10 did not match due to:
Overload of function 'sub': File: <numerous>: Line N/A.
With argument(s): '(UniTuple(int64 x 2), float64)':
No match.
- Of which 2 did not match due to:
Operator Overload in function 'sub': File: unknown: Line unknown.
With argument(s): '(UniTuple(int64 x 2), float64)':
No match for registered cases:
* (int64, int64) -> int64
* (int64, uint64) -> int64
* (uint64, int64) -> int64
* (uint64, uint64) -> uint64
* (float32, float32) -> float32
* (float64, float64) -> float64
* (complex64, complex64) -> complex64
* (complex128, complex128) -> complex128
During: typing of intrinsic-call at D:\Miniconda3\envs\dl\lib\site-packages\py_eddy_tracker\generic.py (570)
File "D:\Miniconda3\envs\dl\lib\site-packages\py_eddy_tracker\generic.py", line 570:
def nearest_grd_indice(x, y, x0, y0, xstep, ystep):
<source elided>
return (
numba_types.int32(round(((x - x0[0]) % 360.0)/xstep)),
^
python-BaseException
Backend TkAgg is interactive backend. Turning interactive mode on.
Temporary Solution:
Find add_uv_lagerloef()
function in ~/.conda/envs/dl/lib/python3.7/site-packages/py_eddy_tracker/dataset/grid.py
line 1700:
Modify:
def add_uv_lagerloef(self, grid_height, uname="u", vname="v", schema=15):
self.add_uv(grid_height, uname, vname)
latmax = 5
# _, (i_start, i_end) = self.nearest_grd_indice((0, 0), )
i_start, i_end = (((-latmax, latmax) - self.y_bounds[0])/self.ystep).round().astype('int32') # debug from numba
sl = slice(i_start, i_end)
# Divide by sideral day
lat = self.y_c[sl]
gob = (
cos(deg2rad(lat))
* ones((self.x_c.shape[0], 1))
* 4.0
* pi
/(23 * 3600 + 56 * 60 + 4.1)
/self.EARTH_RADIUS
)
with errstate(divide="ignore"):
gob = self.GRAVITY/(gob * ones((self.x_c.shape[0], 1)))
mode = "wrap" if self.is_circular() else "reflect"
# fill data to compute a finite difference on all point
data = self.convolve_filter_with_dynamic_kernel(
grid_height,
self.kernel_bessel,
lat_max=10,
wave_length=500,
order=1,
extend=0.1,
)
data = self.convolve_filter_with_dynamic_kernel(
data, self.kernel_bessel, lat_max=10, wave_length=500, order=1, extend=0.1
)
data = self.convolve_filter_with_dynamic_kernel(
data, self.kernel_bessel, lat_max=10, wave_length=500, order=1, extend=0.1
)
v_lagerloef = (
self.compute_finite_difference(
self.compute_finite_difference(data, mode=mode, schema=schema),
mode=mode,
schema=schema,
)[:, sl]
* gob
)
# u_lagerloef = (
# -self.compute_finite_difference(
# self.compute_finite_difference(data, vertical=True, schema=schema),
# vertical=True,
# schema=schema,
# )[:, sl]
# * gob
# )
u_lagerloef = (
-self.compute_finite_difference(
self.compute_finite_difference(data, mode=mode, schema=schema),
mode=mode,
schema=schema,
)[:, sl]
* gob
)
w = 1 - exp(-((lat/2.2) ** 2))
self.vars[vname][:, sl] = self.vars[vname][:, sl] * w + v_lagerloef * (1 - w)
self.vars[uname][:, sl] = self.vars[uname][:, sl] * w + u_lagerloef * (1 - w)
1 line 1703
Don’t use numba
to calculate i_start, i_end
# _, (i_start, i_end) = self.nearest_grd_indice((0, 0), )
i_start, i_end = (((-latmax, latmax) - self.y_bounds[0])/self.ystep).round().astype('int32')
2 line 1743
fix the problem that the generated ugos
is missing
# u_lagerloef = (
# -self.compute_finite_difference(
# self.compute_finite_difference(data, vertical=True, schema=schema),
# vertical=True,
# schema=schema,
# )[:, sl]
# * gob
# )
u_lagerloef = (
-self.compute_finite_difference(
self.compute_finite_difference(data, mode=mode, schema=schema),
mode=mode,
schema=schema,
)[:, sl]
* gob
)
Read More:
- How to Solev QT compilation error “cannot find – LGL”
- How to Solve Error: avoided redundant navigation to current location: “index/user”
- Debug Error: Failed to fetch current robot state [How to Solve]
- [Solved] MindSpore Error: task_fail_info or current_graph_ is nullptr
- [Solved] RuntimeError: An attempt has been made to start a new process before the current process…
- The URL is timestamped to avoid caching problems when requesting the current path again
- The showdialog() method in thread/threading. Timer/task reported an error: “before ole can be called, the current thread must be set to single thread unit (STA) mode.”
- [Solved] CMake Error: The current CMakeCache.txt directory is different than xxx
- [Solved] Redisson distributed lock error: attempt to unlock lock, not locked by current thread by node id
- [Solved] Keil error: #101: “name“ has already been declared in the current scope
- [Solved] ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
- [Solved] eggjs Error: Warning: Current Server Discovery and Monitoring engine is deprecated, and will be rem…
- Postgres Multiple data insertion error: The ‘default‘ dialect with current database version settings does not support
- [Solved] PostgreSQL Error: ERROR: CURRENT TRANSACTION IS ABORTED, COMMANDS IGNORED UNTIL END OF TRANSA
- How to Solve Error: Heartbeating to master:7182 failed.
- Current request is not a multipart request [How to Solve]
- [Solved] The version of springcloud must support the current version of springboot, otherwise the startup project will report an error: error starting ApplicationContext
- How to Solve ModuleNotFoundError: No module named ‘_bz2‘
- How to Solve Pydicom Read Dicom File Error: OSError
- Vivado Error: [Chipscope 16-302]Could not generate core for dbg_hub.Aborting IP Generate operaion.The current Vivado temporary directory path.