Repository: numpy/numpy
File: numpy/typing/tests/data/fail/ma.pyi (Python)

Code before:
MAR_1d_f8.sort(kind='cabbage')  # E: No overload variant
MAR_1d_f8.sort(order=lambda: 'cabbage')  # E: No overload variant
MAR_1d_f8.sort(endwith='cabbage')  # E: No overload variant
MAR_1d_f8.sort(fill_value=lambda: 'cabbage')  # E: No overload variant
MAR_1d_f8.sort(stable='cabbage')  # E: No overload variant
MAR_1d_f8.sort(stable=True)  # E: No overload variant

MAR_1d_f8.take(axis=1.0)  # E: No overload variant
MAR_1d_f8.take(out=1)  # E: No overload variant
MAR_1d_f8.take(mode="bob")  # E: No overload variant

np.ma.take(None)  # E: No overload variant
np.ma.take(axis=1.0)  # E: No overload variant
np.ma.take(out=1)  # E: No overload variant
np.ma.take(mode="bob")  # E: No overload variant

MAR_1d_f8.partition(['cabbage'])  # E: No overload variant
MAR_1d_f8.partition(axis=(0,1))  # E: No overload variant
MAR_1d_f8.partition(kind='cabbage')  # E: No overload variant
MAR_1d_f8.partition(order=lambda: 'cabbage')  # E: No overload variant
MAR_1d_f8.partition(AR_b)  # E: No overload variant

MAR_1d_f8.argpartition(['cabbage'])  # E: No overload variant
MAR_1d_f8.argpartition(axis=(0,1))  # E: No overload variant
MAR_1d_f8.argpartition(kind='cabbage')  # E: No overload variant
MAR_1d_f8.argpartition(order=lambda: 'cabbage')  # E: No overload variant
MAR_1d_f8.argpartition(AR_b)  # E: No overload variant

np.ma.ndim(lambda: 'lambda')  # E: No overload variant

np.ma.size(AR_b, axis='0')  # E: No overload variant

MAR_1d_f8 >= (lambda x: 'mango') # E: No overload variant

MAR_1d_f8 > (lambda x: 'mango') # E: No overload variant

MAR_1d_f8 <= (lambda x: 'mango') # E: No overload variant

MAR_1d_f8 < (lambda x: 'mango') # E: No overload variant

MAR_1d_f8.count(axis=0.)  # E: No overload variant

np.ma.count(MAR_1d_f8, axis=0.)  # E: No overload variant

MAR_1d_f8.put(4, 999, mode='flip')  # E: No overload variant

np.ma.put(MAR_1d_f8, 4, 999, mode='flip')  # E: No overload variant

np.ma.put([1,1,3], 0, 999)  # E: No overload variant

np.ma.compressed(lambda: 'compress me')  # E: No overload variant

Review comment (bug):
huh, why is mypy reporting an additional `[call-arg]` error here now?

Code after:
MAR_1d_f8.sort(fill_value=lambda: 'cabbage')  # type: ignore[arg-type]
MAR_1d_f8.sort(stable='cabbage')  # type: ignore[arg-type]
MAR_1d_f8.sort(stable=True)  # type: ignore[arg-type]

MAR_1d_f8.take(axis=1.0)  # type: ignore[call-overload]
MAR_1d_f8.take(out=1)  # type: ignore[call-overload]
MAR_1d_f8.take(mode="bob")  # type: ignore[call-overload]

np.ma.take(None)  # type: ignore[call-overload]
np.ma.take(axis=1.0)  # type: ignore[call-overload]
np.ma.take(out=1)  # type: ignore[call-overload]
np.ma.take(mode="bob")  # type: ignore[call-overload]

MAR_1d_f8.partition(['cabbage'])  # type: ignore[arg-type]
MAR_1d_f8.partition(axis=(0,1))  # type: ignore[arg-type, call-arg]
MAR_1d_f8.partition(kind='cabbage')  # type: ignore[arg-type, call-arg]
MAR_1d_f8.partition(order=lambda: 'cabbage')  # type: ignore[arg-type, call-arg]
MAR_1d_f8.partition(AR_b)  # type: ignore[arg-type]

MAR_1d_f8.argpartition(['cabbage'])  # type: ignore[arg-type]
MAR_1d_f8.argpartition(axis=(0,1))  # type: ignore[arg-type, call-arg]
MAR_1d_f8.argpartition(kind='cabbage')  # type: ignore[arg-type, call-arg]
MAR_1d_f8.argpartition(order=lambda: 'cabbage')  # type: ignore[arg-type, call-arg]
MAR_1d_f8.argpartition(AR_b)  # type: ignore[arg-type]

np.ma.ndim(lambda: 'lambda')  # type: ignore[arg-type]

np.ma.size(AR_b, axis='0')  # type: ignore[arg-type]

MAR_1d_f8 >= (lambda x: 'mango') # type: ignore[operator]
MAR_1d_f8 > (lambda x: 'mango') # type: ignore[operator]
MAR_1d_f8 <= (lambda x: 'mango') # type: ignore[operator]
MAR_1d_f8 < (lambda x: 'mango') # type: ignore[operator]

MAR_1d_f8.count(axis=0.)  # type: ignore[call-overload]

np.ma.count(MAR_1d_f8, axis=0.)  # type: ignore[call-overload]

MAR_1d_f8.put(4, 999, mode='flip')  # type: ignore[arg-type]

np.ma.put(MAR_1d_f8, 4, 999, mode='flip')  # type: ignore[arg-type]

np.ma.put([1,1,3], 0, 999)  # type: ignore[arg-type]

np.ma.compressed(lambda: 'compress me')  # type: ignore[call-overload]

np.ma.allequal(MAR_1d_f8, [1,2,3], fill_value=1.5)  # type: ignore[arg-type]

np.ma.allclose(MAR_1d_f8, [1,2,3], masked_equal=4.5)  # type: ignore[arg-type]
np.ma.allclose(MAR_1d_f8, [1,2,3], rtol='.4')  # type: ignore[arg-type]
np.ma.allclose(MAR_1d_f8, [1,2,3], atol='.5')  # type: ignore[arg-type]