Open kshitij12345 opened 4 years ago
@kshitij12345 This has been addressed in the new np
module:
from mxnet import np, npx
npx.set_np()
import numpy as onp
def test_replace(array_constructor):
array = [[0.0, 2]]
x = array_constructor(array)
zero_mask = x == 0.0
print(zero_mask)
x[zero_mask] = 1e-6
print(x)
test_replace(np.array)
print('*' * 8)
test_replace(onp.array)
running this on the latest master:
[[ True False]]
[[1.e-06 2.e+00]]
********
[[ True False]]
[[1.e-06 2.e+00]]
@haojin2 Noted.
However shouldn't there be some sort of deprecation warning or anything. Cause right now it silently computes the incorrect result.
Description
Incorrect output when assigning with mask_array
To Reproduce
Output
Environment
We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below: