summaryrefslogtreecommitdiff
path: root/numpy/array_api/_elementwise_functions.py
diff options
context:
space:
mode:
authorWarren Weckesser <warren.weckesser@gmail.com>2020-11-08 03:24:06 -0500
committerWarren Weckesser <warren.weckesser@gmail.com>2020-11-08 03:42:59 -0500
commit0e894153d7ac241c770286bd8c100c9c269dc44e (patch)
treeb066352aa3e19573d6f1c944c6d87d51f516041d /numpy/array_api/_elementwise_functions.py
parent5f071c67660dd3eedd6eddb39681cd2943166e68 (diff)
downloadnumpy-0e894153d7ac241c770286bd8c100c9c269dc44e.tar.gz
MAINT: ma: Remove unused `**options` from MaskedArray `__new__` method.
The `__new__` method of `MaskedArray` has the parameter `**options`, but it is not used. This means a mistyped parameter is silently ignored, e.g. if I mistype the `mask` parameter like this, I don't get an error: In [2]: m = np.ma.MaskedArray([1, 2, 3], maks=[0, 1, 0]) In [3]: m Out[3]: masked_array(data=[1, 2, 3], mask=False, fill_value=999999) In this PR, I simply remove `**options` from the signature of `MaskedArray.__new__`. This affected one test. That test was passing the argument `shape=(0, 1, 2)` to the constructor of a subclass of `MaskedArray`, but since any unknown keywords were silently ignored, that use of `shape` had no effect. I replaced it with the positional argument `[[[]], [[]]]`, which I believe has the effect that was originally intended with the use of the `shape` argument.
Diffstat (limited to 'numpy/array_api/_elementwise_functions.py')
0 files changed, 0 insertions, 0 deletions