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

Slice assign #486

Open
burungiu opened this issue Jan 30, 2023 · 1 comment
Open

Slice assign #486

burungiu opened this issue Jan 30, 2023 · 1 comment

Comments

@burungiu
Copy link

Hello everyone, there is a way to do assigment as in python?
Example:
preds[:, :, 0] = preds[:, :, 0] % heatmapWidth

Thank you

@bojake
Copy link
Contributor

bojake commented Feb 28, 2023

There is an issue with auto-broadening of scalar operands in the framework.

For instance:

var foo = (array > 12f); // fails
var foo = np.full(12f, array.shape);
var result = (array > foo); // successful

In your "heatmapWidth" operand just create an "np.full(heatmapWidth, preds.shape)" NDArray and use that as the operand. I bet that will work for you.

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