Skip to content

Conversation

@endolith
Copy link
Member

As mentioned in #8413 (comment), it has never actually been possible to set the boundary using an integer, since _bvalfromboundary has been broken since it was created 17 years ago, raising UnboundLocalError: local variable 'val' referenced before assignment.

The mode argument _valfrommode was initially broken the same way, but fixed shortly afterward .

But if no one noticed that it doesn't work for boundary= in the last 17 years, it seems like numeric parameters are not commonly used. Also they are untested, and were removed from the documentation 8 years ago.

Is there any benefit to supporting them?

@larsoner
Copy link
Member

+1 for removal from me. We can re-add properly later if people end up needing them.

val = boundary << 2
return val
raise ValueError("Acceptable boundary flags are 'fill', 'wrap'"
" (or 'circular'), \n and 'symm'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a manual line break is not needed here since most consoles are softwrapping messages anyways. A small nitpick I would suggest the following; first giving the actual full mode name and then the alias.

raise ValueError("Unknown flag type given. Valid options are 'fill', 'wrap'"
                 " 'circular' (or 'circ' ), and 'symmetric' (or 'symm' ).")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I changed it similarly

@endolith endolith force-pushed the remove_numeric_arguments branch from dabd29e to 907c34b Compare March 13, 2018 21:38
@ilayn
Copy link
Member

ilayn commented Mar 13, 2018

New commit is only a change in the commit test so merging. Thanks @endolith !

@ilayn ilayn merged commit 0156791 into scipy:master Mar 13, 2018
@endolith endolith deleted the remove_numeric_arguments branch March 13, 2018 21:44
@pv pv added this to the 1.1.0 milestone Mar 17, 2018
@endolith endolith changed the title Remove numerical arguments from convolve2d / correlate2d DEP: Remove numerical arguments from convolve2d / correlate2d May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants