We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
climate._target_region
There seems to be a problem with the climate.target_region function which incorrectly extracts one column to the right of the intended one. https://github.com/mathurinm/celer/blob/main/celer/datasets/climate.py#L60-L72
climate.target_region
The pos_Lx value range is supposed to be 0~143, but it is 0~144. For example, if Lx is 359, pos_Lx will be 144.
pos_Lx
0~143
0~144
Lx
Shouldn't we use np.floor insted of np.ceil?
np.floor
np.ceil
The text was updated successfully, but these errors were encountered:
Hi @shimon-sato, thanks for reporting that. Could you provide a code snippet that reproduces this behavior?
Sorry, something went wrong.
Thanks for the reply. Reproduce codes are listed below.
import numpy as np Lx = 359 pos_Lx = (np.ceil(Lx / 2.5)).astype(int) assert 0 <= pos_Lx <= 143
AssertionError
from numpy import testing from celer import datasets _, y1 = datasets.climate._target_region(90, 359) _, y2 = datasets.climate._target_region(87.5, 0) # This code means `assert not assert_array_equal` testing.assert_raises(AssertionError, testing.assert_array_equal, y1, y2)
AssertionError: AssertionError not raised by assert_array_equal
Badr-MOUFAD
No branches or pull requests
There seems to be a problem with the
climate.target_region
function which incorrectly extracts one column to the right of the intended one.https://github.com/mathurinm/celer/blob/main/celer/datasets/climate.py#L60-L72
The
pos_Lx
value range is supposed to be0~143
, but it is0~144
.For example, if
Lx
is 359,pos_Lx
will be 144.Shouldn't we use
np.floor
insted ofnp.ceil
?The text was updated successfully, but these errors were encountered: