Skip to content

replace deprecated np.fromstring() by np.frombuffer()#26949

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
shyama7004:Fix
Feb 21, 2025
Merged

replace deprecated np.fromstring() by np.frombuffer()#26949
asmorkalov merged 1 commit intoopencv:4.xfrom
shyama7004:Fix

Conversation

@shyama7004
Copy link
Copy Markdown
Contributor

Source : https://numpy.org/devdocs/reference/generated/numpy.fromstring.html

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Copy Markdown
Contributor

The function was deprecated in Numpy 1.14: https://numpy.org/doc/2.2/reference/generated/numpy.fromstring.html
We still have "numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
I'll update it there and merge the PR.

@asmorkalov asmorkalov self-assigned this Feb 21, 2025
@asmorkalov asmorkalov self-requested a review February 21, 2025 06:05
@asmorkalov asmorkalov added test category: python bindings cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) labels Feb 21, 2025
@asmorkalov asmorkalov added this to the 4.12.0 milestone Feb 21, 2025
@asmorkalov asmorkalov merged commit a256886 into opencv:4.x Feb 21, 2025
28 checks passed
@shyama7004 shyama7004 deleted the Fix branch February 21, 2025 11:17
@asmorkalov asmorkalov mentioned this pull request Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: python bindings cleanup Code cleanup (e.g, drop legacy C-API, legacy unmaintained code) test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants