SciSharp/NumSharp

Slice assign

burungiu opened this issue · 1 comments

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

Thank you

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.