Update calcBackProject_Demo1.py#17055
Conversation
To round a ndarray it's necessary to use np.round() instead to Built-in Python round()
|
The issue is reproducible with Python3 only: Python2 works as expected. |
asmorkalov
left a comment
There was a problem hiding this comment.
The issue is reproducible with branch 3.4 and the patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).
So, please:
- change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
- rebase your commits from master onto 3.4 branch. For example:
git rebase -i --onto upstream/3.4 upstream/master
(check list of your commits, save and quit (Esc + "wq" + Enter)
whereupstreamis configured by following this GitHub guide and fetched (git fetch upstream). - push rebased commits into source branch of your fork (with
--forceoption)
Note: no need to re-open PR, apply changes "inplace".
|
@vnikoofard I'd say it can be implemented in a clearer and more performant way: What do you think? |
|
@vnikoofard Do you have a chance to look at proposal from sergregory? |
|
Sorry for delay. Yes, I agree with @sergregory. It seems more efficient. |
|
@vnikoofard Could you rebase your branch to 3.4 and update the solution as @sergregory proposed? |
I'm a complete newbie! Sorry for my ignorance but on my top of the screen, below the title of commit is written: |
|
Yes, You are right, it's already targeted to 3.4. I removed |
To round a ndarray it's necessary to use np.round() instead to Built-in Python round()
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.