Skip to content

Commit

Permalink
Merge branch 'main' into deterministic-find_dist_part
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Mar 18, 2024
2 parents aa5102f + 889143d commit c7a9b63
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 57 deletions.
9 changes: 5 additions & 4 deletions pytato/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ def make_dict_of_named_arrays(data: Dict[str, Array], *,

def make_placeholder(name: str,
shape: ConvertibleToShape,
dtype: Any,
dtype: Any = np.float64,
tags: abc_Set[Tag] = FrozenOrderedSet(), # noqa: B008
axes: Optional[AxesT] = None) -> Placeholder:
"""Make a :class:`Placeholder` object.
Expand All @@ -2004,7 +2004,8 @@ def make_placeholder(name: str,
if not given
:param shape: shape of the placeholder array
:param dtype: dtype of the placeholder array
(must be convertible to :class:`numpy.dtype`)
(must be convertible to :class:`numpy.dtype`, default is
:class:`numpy.float64`)
:param tags: implementation tags
"""
_check_identifier(name, optional=False)
Expand Down Expand Up @@ -2437,7 +2438,7 @@ def maximum(x1: ArrayOrScalar, x2: ArrayOrScalar) -> ArrayOrScalar:
from pytato.cmath import isnan
return where(logical_or(isnan(x1), isnan(x2)),
# I don't know why pylint thinks common_dtype is a tuple.
common_dtype.type(np.NaN), # pylint: disable=no-member
common_dtype.type(np.nan), # pylint: disable=no-member
where(greater(x1, x2), x1, x2))
else:
return where(greater(x1, x2), x1, x2)
Expand All @@ -2456,7 +2457,7 @@ def minimum(x1: ArrayOrScalar, x2: ArrayOrScalar) -> ArrayOrScalar:
from pytato.cmath import isnan
return where(logical_or(isnan(x1), isnan(x2)),
# I don't know why pylint thinks common_dtype is a tuple.
common_dtype.type(np.NaN), # pylint: disable=no-member
common_dtype.type(np.nan), # pylint: disable=no-member
where(less(x1, x2), x1, x2))
else:
return where(less(x1, x2), x1, x2)
Expand Down
Loading

0 comments on commit c7a9b63

Please sign in to comment.