Quansight-Labs / numpy.net

A port of NumPy to .Net
BSD 3-Clause "New" or "Revised" License
128 stars 14 forks source link

String parsing returns 0 #18

Closed Happypig375 closed 2 years ago

Happypig375 commented 2 years ago
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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

KevinBaselinesw commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

fixed

KevinBaselinesw commented 1 year ago

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

Yes, that is correct.

From: Hadrian Tang @.> Sent: Sunday, March 27, 2022 11:31 AM To: Quansight-Labs/numpy.net @.> Cc: KevinBaselinesw @.>; Comment @.> Subject: Re: [Quansight-Labs/numpy.net] String parsing returns 0 (Issue #18)

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.

— Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/18#issuecomment-1079954397 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWX6NTX7ATDBXJG3B3TVCB5NDANCNFSM5RYYF4NQ . You are receiving this because you commented. https://github.com/notifications/beacon/ACP4GWVNW3ZWCCCTYIWNJYTVCB5NDA5CNFSM5RYYF4N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIBPMXXI.gif Message ID: @. @.> >