Skip to content
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

Fix bugs in latest version of NumPy #7

Merged

Conversation

will945945945
Copy link
Contributor

@will945945945 will945945945 commented Dec 26, 2024

Fix bugs in using latest version of NumPy for tree-based model.

  1. np.full(..., 0) returns an np.array with int64, but we need float64.
  2. np.matrix ** 2 will be represented as the square of a ``square matrix'' in the latest NumPy version.
    For the element-wise square of an np.matrix, we should use np.square( np.matrix ).

Test CLI & API (bash tests/autotest.sh)

Test APIs used by main.py.

  • Test Pass
    • (Copy and paste the last outputted line here.)
  • Not Applicable (i.e., the PR does not include API changes.)

Check API Document

If any new APIs are added, please check if the description of the APIs is added to API document.

  • API document is updated (linear, nn)
  • Not Applicable (i.e., the PR does not include API changes.)

Test quickstart & API (bash tests/docs/test_changed_document.sh)

If any APIs in quickstarts or tutorials are modified, please run this test to check if the current examples can run correctly after the modified APIs are released.

2. np.matrix ** 2 will be represented as the square of a ``square matrix'' in the latest NumPy version.
   For the element-wise square of an np.matrix, we should use np.square( np.matrix ).
@will945945945 will945945945 requested review from cjlin1 and a team as code owners December 26, 2024 05:42
@Eleven1Liu Eleven1Liu added model/linear bug Something isn't working labels Dec 26, 2024
@Eleven1Liu Eleven1Liu merged commit 3d40d14 into ntumlgroup:master Dec 26, 2024
1 check passed
@will945945945 will945945945 deleted the fix_bugs_in_new_numpy_version branch December 27, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code format model/linear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants