Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion arraycontext/container/arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ def _deserialize_init_arrays_code(cls, tmpl_instance_name, args):
if rel_comparison is None:
raise TypeError("rel_comparison must be specified")

if bcast_numpy_array:
from warnings import warn
warn("'bcast_numpy_array=True' is deprecated and will be unsupported"
" from December 2021", DeprecationWarning, stacklevel=2)

if _bcast_actx_array_type:
raise ValueError("'bcast_numpy_array' and '_bcast_actx_array_type'"
" cannot be both set.")

if rel_comparison and eq_comparison is None:
eq_comparison = True

Expand All @@ -216,7 +225,7 @@ def _deserialize_init_arrays_code(cls, tmpl_instance_name, args):
raise TypeError("bcast_obj_array must be set if bcast_numpy_array is")

if _bcast_actx_array_type is None:
if _cls_has_array_context_attr:
if _cls_has_array_context_attr and (not bcast_numpy_array):
_bcast_actx_array_type = bcast_number
else:
_bcast_actx_array_type = False
Expand Down