-
Notifications
You must be signed in to change notification settings - Fork 1.4k
TClass::GetCheckSum fix for returned arugment #93
New issue
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
Merged
FonsRademakers
merged 1 commit into
root-project:v6-02-00-patches
from
Dr15Jones:fixTClassGetClassChecksum
Sep 23, 2015
Merged
TClass::GetCheckSum fix for returned arugment #93
FonsRademakers
merged 1 commit into
root-project:v6-02-00-patches
from
Dr15Jones:fixTClassGetClassChecksum
Sep 23, 2015
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the GetCheckSum value was already cached then the argument passed to the function was not set. This now properly sets the value.
Collaborator
Author
|
@pcanal This fixes the problem I reported on the email thread: |
Member
|
Oups. You are correct. Sorry for the confusion. Patch pushed to the repository. |
Closed
guitargeek
added a commit
to guitargeek/root
that referenced
this pull request
Dec 23, 2025
The new NumPy 2.4.0 is more strict when implicitly converting 1-element arrays to scalars. It doesn't do that anymore, causing the TF1 Pythonization tests to fail (see log below). This actually pointed to a real mistake in setting up the test, where a 2D array was used to define the TFormula parameters while it should be a 1D array. ```txt 962/3718 Test root-project#93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... ok test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic) Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok test_fitgauss (tf_pycallables.TF1.test_fitgauss) Test fitting a histogram to a Python function ... ok test_identity (tf_pycallables.TF1.test_identity) Test simple function without parameters ... ok test_params (tf_pycallables.TF1.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF2.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF3.test_params) Test function with parameters ... ok ====================================================================== ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ---------------------------------------------------------------------- Traceback (most recent call last): File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar expected_value = pyf_tf1_coulomb(x[i, ::2], params) File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0]) ~~~~~~~~^^^^^^^^^^^^^^ TypeError: only 0-dimensional arrays can be converted to Python scalars ---------------------------------------------------------------------- Ran 8 tests in 1.469s FAILED (errors=1) CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message): error code: 1 ```
guitargeek
added a commit
that referenced
this pull request
Dec 23, 2025
The new NumPy 2.4.0 is more strict when implicitly converting 1-element arrays to scalars. It doesn't do that anymore, causing the TF1 Pythonization tests to fail (see log below). This actually pointed to a real mistake in setting up the test, where a 2D array was used to define the TFormula parameters while it should be a 1D array. ```txt 962/3718 Test #93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... ok test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic) Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok test_fitgauss (tf_pycallables.TF1.test_fitgauss) Test fitting a histogram to a Python function ... ok test_identity (tf_pycallables.TF1.test_identity) Test simple function without parameters ... ok test_params (tf_pycallables.TF1.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF2.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF3.test_params) Test function with parameters ... ok ====================================================================== ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ---------------------------------------------------------------------- Traceback (most recent call last): File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar expected_value = pyf_tf1_coulomb(x[i, ::2], params) File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0]) ~~~~~~~~^^^^^^^^^^^^^^ TypeError: only 0-dimensional arrays can be converted to Python scalars ---------------------------------------------------------------------- Ran 8 tests in 1.469s FAILED (errors=1) CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message): error code: 1 ```
guitargeek
added a commit
to guitargeek/root
that referenced
this pull request
Dec 23, 2025
The new NumPy 2.4.0 is more strict when implicitly converting 1-element arrays to scalars. It doesn't do that anymore, causing the TF1 Pythonization tests to fail (see log below). This actually pointed to a real mistake in setting up the test, where a 2D array was used to define the TFormula parameters while it should be a 1D array. ```txt 962/3718 Test root-project#93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... ok test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic) Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok test_fitgauss (tf_pycallables.TF1.test_fitgauss) Test fitting a histogram to a Python function ... ok test_identity (tf_pycallables.TF1.test_identity) Test simple function without parameters ... ok test_params (tf_pycallables.TF1.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF2.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF3.test_params) Test function with parameters ... ok ====================================================================== ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ---------------------------------------------------------------------- Traceback (most recent call last): File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar expected_value = pyf_tf1_coulomb(x[i, ::2], params) File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0]) ~~~~~~~~^^^^^^^^^^^^^^ TypeError: only 0-dimensional arrays can be converted to Python scalars ---------------------------------------------------------------------- Ran 8 tests in 1.469s FAILED (errors=1) CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message): error code: 1 ``` (cherry picked from commit d5135f7)
guitargeek
added a commit
to guitargeek/root
that referenced
this pull request
Dec 23, 2025
The new NumPy 2.4.0 is more strict when implicitly converting 1-element arrays to scalars. It doesn't do that anymore, causing the TF1 Pythonization tests to fail (see log below). This actually pointed to a real mistake in setting up the test, where a 2D array was used to define the TFormula parameters while it should be a 1D array. ```txt 962/3718 Test root-project#93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... ok test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic) Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok test_fitgauss (tf_pycallables.TF1.test_fitgauss) Test fitting a histogram to a Python function ... ok test_identity (tf_pycallables.TF1.test_identity) Test simple function without parameters ... ok test_params (tf_pycallables.TF1.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF2.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF3.test_params) Test function with parameters ... ok ====================================================================== ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ---------------------------------------------------------------------- Traceback (most recent call last): File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar expected_value = pyf_tf1_coulomb(x[i, ::2], params) File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0]) ~~~~~~~~^^^^^^^^^^^^^^ TypeError: only 0-dimensional arrays can be converted to Python scalars ---------------------------------------------------------------------- Ran 8 tests in 1.469s FAILED (errors=1) CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message): error code: 1 ``` (cherry picked from commit d5135f7)
guitargeek
added a commit
that referenced
this pull request
Dec 24, 2025
The new NumPy 2.4.0 is more strict when implicitly converting 1-element arrays to scalars. It doesn't do that anymore, causing the TF1 Pythonization tests to fail (see log below). This actually pointed to a real mistake in setting up the test, where a 2D array was used to define the TFormula parameters while it should be a 1D array. ```txt 962/3718 Test #93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... ok test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic) Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok test_fitgauss (tf_pycallables.TF1.test_fitgauss) Test fitting a histogram to a Python function ... ok test_identity (tf_pycallables.TF1.test_identity) Test simple function without parameters ... ok test_params (tf_pycallables.TF1.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF2.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF3.test_params) Test function with parameters ... ok ====================================================================== ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ---------------------------------------------------------------------- Traceback (most recent call last): File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar expected_value = pyf_tf1_coulomb(x[i, ::2], params) File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0]) ~~~~~~~~^^^^^^^^^^^^^^ TypeError: only 0-dimensional arrays can be converted to Python scalars ---------------------------------------------------------------------- Ran 8 tests in 1.469s FAILED (errors=1) CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message): error code: 1 ``` (cherry picked from commit d5135f7)
guitargeek
added a commit
that referenced
this pull request
Dec 24, 2025
The new NumPy 2.4.0 is more strict when implicitly converting 1-element arrays to scalars. It doesn't do that anymore, causing the TF1 Pythonization tests to fail (see log below). This actually pointed to a real mistake in setting up the test, where a 2D array was used to define the TFormula parameters while it should be a 1D array. ```txt 962/3718 Test #93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec test_callable (tf_pycallables.TF1.test_callable) Test function provided as callable ... ok test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic) Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok test_fitgauss (tf_pycallables.TF1.test_fitgauss) Test fitting a histogram to a Python function ... ok test_identity (tf_pycallables.TF1.test_identity) Test simple function without parameters ... ok test_params (tf_pycallables.TF1.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF2.test_params) Test function with parameters ... ok test_params (tf_pycallables.TF3.test_params) Test function with parameters ... ok ====================================================================== ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar) Test the 2D Numpy array pythonizations for TF1::EvalPar ---------------------------------------------------------------------- Traceback (most recent call last): File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar expected_value = pyf_tf1_coulomb(x[i, ::2], params) File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0]) ~~~~~~~~^^^^^^^^^^^^^^ TypeError: only 0-dimensional arrays can be converted to Python scalars ---------------------------------------------------------------------- Ran 8 tests in 1.469s FAILED (errors=1) CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message): error code: 1 ``` (cherry picked from commit d5135f7)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the GetCheckSum value was already cached then the argument passed
to the function was not set. This now properly sets the value.