decthings

Condition

Takes three inputs: condition, if-true and if-false, and outputs one of if-true and if-false, depending on the condition (element-wise).

Any input data type is supported, but the inputs if-true and if-false must have the same data type. For the condition input, strings are interpreted as the boolean value false if the string is empty, and true otherwise. For numbers, a value of 0 is interpretted as false and all other values as 1. The output will have the same data type as if-true and if-false.

All three inputs must have the same shape, or be broadcastable to a common shape. The output will have the same shape as the input, or as the common shape that was broadcasted to.

Product

  • Documentation
  • Pricing
  • API reference
  • Guides

Company

  • Support

Get going!

Sign up
  • Terms and conditions
  • Privacy policy
  • Cookie policy
  • GitHub
  • LinkedIn

This website uses cookies to enhance the experience.

Learn more