Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: add type check for encoding at lib/npyio.py #20510

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from

Conversation

scratchmex
Copy link
Contributor

We should let lib._dataloader.open raise the exceptions needed instead of handling it for each case ourselves.

fixes #20329

@scratchmex
Copy link
Contributor Author

scratchmex commented Dec 3, 2021

I am seeing that this conflicts with #20389 so maybe we should get to a conclusion. For me, it is better for lib._dataloader.open to raise the corresponding exceptions instead of handling them repeatedly in genfromtxt and loadtxt.

@WarrenWeckesser @andrekwr @mattip

@mattip
Copy link
Member

mattip commented Dec 16, 2021

#20389 was merged. If you still want to pursue this as a simplification, please rebase/rework on current master.

@scratchmex
Copy link
Contributor Author

#20389 was merged. If you still want to pursue this as a simplification, please rebase/rework on current master.

Done

@scratchmex
Copy link
Contributor Author

@mattip ping

@mattip
Copy link
Member

mattip commented Jan 18, 2022

@seberg will this cause issues for #20580? It does seem like the change here is for the better.

@mattip
Copy link
Member

mattip commented Jan 18, 2022

... except for the failing tests :)

@seberg
Copy link
Member

seberg commented Jan 18, 2022

No, should be fine for the loadtxt to C move. I am not touching that datasource stuff after all. It might be that we need to tweak a test checking for the exact error being returned for bad encoding, but that's it.

@seberg
Copy link
Member

seberg commented Sep 26, 2022

Not sure why this had stalled, probably due to the whole C-loadtxt changes.

This still seems right, and merge-conflict aside probably good to go.

The one thing I would like to check is whether we currently accept byte-strings, in which case it may be good to deprecate that support (or simply keep it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: lib: Incorrect error raised when genfromtxt is given an encoding with the wrong type.
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.