Skip to content

Conversation

@h-mayorquin
Copy link
Collaborator

From the meeting today. Just adding a docstring so we remember why this is here.

Maybe we should change the name to force_signed_int to make it more clear? we can do this in another PR.

@h-mayorquin h-mayorquin requested review from alejoe91 and zm711 June 4, 2025 16:31
@h-mayorquin
Copy link
Collaborator Author

Also, maybe this should throw a warning so it informs users like in #3969?

Comment on lines 403 to 405
Many preprocessors access scipy functions (e.g. filter) that fail silently with unsigned dtypes.
This function fixes the dtype to be signed if it is unsigned.
"""
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we are even more verbose? It does 3 things:

  1. if no dtype is given it will attempt to infer from recording
  2. It will attempt to convert the dtype to an npt.DTypeLike (I forget the actual typing)
  3. if the dype is unsigned it will convert to the signed equivalent (--at potential truncation of large values?)

Or am I misunderstanding?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made improvements in this direction.

@zm711 zm711 added the documentation Improvements or additions to documentation label Jun 4, 2025
Copy link
Member

@zm711 zm711 left a comment

Choose a reason for hiding this comment

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

This works for me as long as Alessio is cool with it!

@alejoe91 alejoe91 added this to the 0.103.0 milestone Jun 11, 2025
@samuelgarcia
Copy link
Member

Lets close this in favor of this #3982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants