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

set Function of NDArray, like set(int[] data) should compare the datatype of NDArray and datatype of data #1970

Closed
warthecatalyst opened this issue Aug 28, 2022 · 2 comments · Fixed by #1975
Labels
bug Something isn't working

Comments

@warthecatalyst
Copy link
Contributor

Description

NDArray anchors = manager.zeros(new Shape(3),Datatype.FLOAT32);
int[] data = new int[]{1,2,3};
anchors.set(data);

Expected Behavior

should throw an exception when datatypes mismatch

@warthecatalyst warthecatalyst added the bug Something isn't working label Aug 28, 2022
@KexinFeng
Copy link
Contributor

What is the current behaviour? I think instead of throwing a datatypes mismatch, another way is to automatically convert the datatype.

@warthecatalyst
Copy link
Contributor Author

it doesn't set the NDArray to corresponding data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants