Skip to content

Commit 4c3592d

Browse files
MAINT: apply ruff/flake8-simplify rule SIM910
SIM910 Use `.get(...)` instead of `.get(..., None)`
1 parent 961d0b6 commit 4c3592d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

numpy/lib/_type_check_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def common_type(*arrays):
689689
if issubclass(t, _nx.integer):
690690
p = 2 # array_precision[_nx.double]
691691
else:
692-
p = array_precision.get(t, None)
692+
p = array_precision.get(t)
693693
if p is None:
694694
raise TypeError("can't get common type for non-numeric array")
695695
precision = max(precision, p)

numpy/ma/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3117,7 +3117,7 @@ def __array_wrap__(self, obj, context=None, return_scalar=False):
31173117
input_args = args[:func.nin]
31183118
m = reduce(mask_or, [getmaskarray(arg) for arg in input_args])
31193119
# Get the domain mask
3120-
domain = ufunc_domain.get(func, None)
3120+
domain = ufunc_domain.get(func)
31213121
if domain is not None:
31223122
# Take the domain, and make sure it's a ndarray
31233123
with np.errstate(divide='ignore', invalid='ignore'):

0 commit comments

Comments
 (0)