Skip to content
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

String parsing returns 0 #18

Closed
Happypig375 opened this issue Mar 27, 2022 · 8 comments
Closed

String parsing returns 0 #18

Happypig375 opened this issue Mar 27, 2022 · 8 comments

Comments

@Happypig375
Copy link
Contributor

using NumpyDotNet;
np.array(new[,]{
    {"0", "1"},
    {"1", "0"},
  }).astype(np.Float64)

Expected

DOUBLE 
{ { 0.0, 1.0 },
  { 1.0, 0.0 } }

Actual

DOUBLE 
{ { 0.0, 0.0 },
  { 0.0, 0.0 } }
@KevinBaselinesw
Copy link
Collaborator

I agree the behavior differs from python. Currently I am not trying to convert any strings to numbers.
Is this a real world problem that you are hitting? I can try to work on it if it is.

@Happypig375
Copy link
Contributor Author

How do you define the "real world"? You can choose not to fix these differing behaviors, but definitely, other people who try to use NumpyDotNet like Numpy will fall into these traps.

@KevinBaselinesw
Copy link
Collaborator

Is there a private email I can send an updated DLL to you instead of generating a new release? You can send me kevin at baselinesw.com

@Happypig375
Copy link
Contributor Author

Are there difficulties in generating a new release? I'm using NumpyDotNet from .NET Interactive Notebooks where updating from NuGet is automatic.

@KevinBaselinesw
Copy link
Collaborator

It is a little bit more work to generate new release. If you are going to continue testing and finding issues, I would rather send fixes to you directly until whatever you are doing is stable. Then I will do a release with all the improvements.

FYI, I have the string conversion changes made.

I investigated the np.delete issue and unfortunately I won't be able to fix that quickly. I don't support deleting by axis which is what your sample does. It is too much work.

@Happypig375
Copy link
Contributor Author

It is a little bit more work to generate new release.

Ah, sure then. I'll email

I don't support deleting by axis which is what your sample does

Actually it does work, I can work around with a reshape afterwards.

@Happypig375
Copy link
Contributor Author

fixed

@KevinBaselinesw
Copy link
Collaborator

KevinBaselinesw commented Oct 11, 2022 via email

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

No branches or pull requests

2 participants