add support for Boolean dtypes for `dpctl.tensor.ceil`, `dpctl.tensor.floor`, and `dpctl.tensor.trunc` by vtavana · Pull Request #2033 · IntelPython/dpctl · GitHub
Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
6 changes: 3 additions & 3 deletions dpctl/tensor/_elementwise_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@

Args:
x (usm_ndarray):
Input array, expected to have a real-valued data type.
Input array, expected to have a boolean or real-valued data type.
out (Union[usm_ndarray, None], optional):
Output array to populate.
Array must have the correct shape and the expected data type.
Expand Down Expand Up @@ -767,7 +767,7 @@

Args:
x (usm_ndarray):
Input array, expected to have a real-valued data type.
Input array, expected to have a boolean or real-valued data type.
out (Union[usm_ndarray, None], optional):
Output array to populate.
Array must have the correct shape and the expected data type.
Expand Down Expand Up @@ -2017,7 +2017,7 @@

Args:
x (usm_ndarray):
Input array, expected to have a real-valued data type.
Input array, expected to have a boolean or real-valued data type.
out (Union[usm_ndarray, None], optional):
Output array to populate.
Array must have the correct shape and the expected data type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ using CeilStridedFunctor = elementwise_common::
template <typename T> struct CeilOutputType
{
using value_type =
typename std::disjunction<td_ns::TypeMapResultEntry<T, std::uint8_t>,
typename std::disjunction<td_ns::TypeMapResultEntry<T, bool>,
td_ns::TypeMapResultEntry<T, std::uint8_t>,
td_ns::TypeMapResultEntry<T, std::uint16_t>,
td_ns::TypeMapResultEntry<T, std::uint32_t>,
td_ns::TypeMapResultEntry<T, std::uint64_t>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ using FloorStridedFunctor = elementwise_common::
template <typename T> struct FloorOutputType
{
using value_type =
typename std::disjunction<td_ns::TypeMapResultEntry<T, std::uint8_t>,
typename std::disjunction<td_ns::TypeMapResultEntry<T, bool>,
td_ns::TypeMapResultEntry<T, std::uint8_t>,
td_ns::TypeMapResultEntry<T, std::uint16_t>,
td_ns::TypeMapResultEntry<T, std::uint32_t>,
td_ns::TypeMapResultEntry<T, std::uint64_t>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ using TruncStridedFunctor = elementwise_common::
template <typename T> struct TruncOutputType
{
using value_type =
typename std::disjunction<td_ns::TypeMapResultEntry<T, std::uint8_t>,
typename std::disjunction<td_ns::TypeMapResultEntry<T, bool>,
td_ns::TypeMapResultEntry<T, std::uint8_t>,
td_ns::TypeMapResultEntry<T, std::uint16_t>,
td_ns::TypeMapResultEntry<T, std::uint32_t>,
td_ns::TypeMapResultEntry<T, std::uint64_t>,
Expand Down
10 changes: 5 additions & 5 deletions dpctl/tests/elementwise/test_floor_ceil_trunc.py