|
1243 | 1243 | ) |
1244 | 1244 | del _logaddexp_docstring_ |
1245 | 1245 |
|
| 1246 | +# B16: ==== LOGICAL_AND (x1, x2) |
| 1247 | +_logical_and_docstring_ = r""" |
| 1248 | +logical_and(x1, x2, /, \*, out=None, order='K') |
| 1249 | +
|
| 1250 | +Computes the logical AND for each element `x1_i` of the input array `x1` with |
| 1251 | +the respective element `x2_i` of the input array `x2`. |
| 1252 | +
|
| 1253 | +Args: |
| 1254 | + x1 (usm_ndarray): |
| 1255 | + First input array. May have any data type. |
| 1256 | + x2 (usm_ndarray): |
| 1257 | + Second input array. May have any data type. |
| 1258 | + out (Union[usm_ndarray, None], optional): |
| 1259 | + Output array to populate. |
| 1260 | + Array must have the correct shape and the expected data type. |
| 1261 | + order ("C","F","A","K", optional): |
| 1262 | + Memory layout of the new output array, if parameter |
| 1263 | + `out` is ``None``. |
| 1264 | + Default: "K". |
| 1265 | +
|
| 1266 | +Returns: |
| 1267 | + usm_ndarray: |
| 1268 | + An array containing the element-wise logical AND results. |
| 1269 | +""" |
| 1270 | +logical_and = BinaryElementwiseFunc( |
| 1271 | + "logical_and", |
| 1272 | + ti._logical_and_result_type, |
| 1273 | + ti._logical_and, |
| 1274 | + _logical_and_docstring_, |
| 1275 | +) |
| 1276 | +del _logical_and_docstring_ |
| 1277 | + |
| 1278 | +# B17: ==== LOGICAL_OR (x1, x2) |
| 1279 | +_logical_or_docstring_ = r""" |
| 1280 | +logical_or(x1, x2, /, \*, out=None, order='K') |
| 1281 | +
|
| 1282 | +Computes the logical OR for each element `x1_i` of the input array `x1` |
| 1283 | +with the respective element `x2_i` of the input array `x2`. |
| 1284 | +
|
| 1285 | +Args: |
| 1286 | + x1 (usm_ndarray): |
| 1287 | + First input array. May have any data type. |
| 1288 | + x2 (usm_ndarray): |
| 1289 | + Second input array. May have any data type. |
| 1290 | + out (Union[usm_ndarray, None], optional): |
| 1291 | + Output array to populate. |
| 1292 | + Array must have the correct shape and the expected data type. |
| 1293 | + order ("C","F","A","K", optional): |
| 1294 | + Memory layout of the new output array, if parameter |
| 1295 | + `out` is ``None``. |
| 1296 | + Default: "K". |
| 1297 | +
|
| 1298 | +Returns: |
| 1299 | + usm_ndarray: |
| 1300 | + An array containing the element-wise logical OR results. |
| 1301 | +""" |
| 1302 | +logical_or = BinaryElementwiseFunc( |
| 1303 | + "logical_or", |
| 1304 | + ti._logical_or_result_type, |
| 1305 | + ti._logical_or, |
| 1306 | + _logical_or_docstring_, |
| 1307 | +) |
| 1308 | +del _logical_or_docstring_ |
| 1309 | + |
| 1310 | +# B18: ==== LOGICAL_XOR (x1, x2) |
| 1311 | +_logical_xor_docstring_ = r""" |
| 1312 | +logical_xor(x1, x2, /, \*, out=None, order='K') |
| 1313 | +
|
| 1314 | +Computes the logical XOR for each element `x1_i` of the input array `x1` |
| 1315 | +with the respective element `x2_i` of the input array `x2`. |
| 1316 | +
|
| 1317 | +Args: |
| 1318 | + x1 (usm_ndarray): |
| 1319 | + First input array. May have any data type. |
| 1320 | + x2 (usm_ndarray): |
| 1321 | + Second input array. May have any data type. |
| 1322 | + out (Union[usm_ndarray, None], optional): |
| 1323 | + Output array to populate. |
| 1324 | + Array must have the correct shape and the expected data type. |
| 1325 | + order ("C","F","A","K", optional): |
| 1326 | + Memory layout of the new output array, if parameter |
| 1327 | + `out` is ``None``. |
| 1328 | + Default: "K". |
| 1329 | +
|
| 1330 | +Returns: |
| 1331 | + usm_ndarray: |
| 1332 | + An array containing the element-wise logical XOR results. |
| 1333 | +""" |
| 1334 | +logical_xor = BinaryElementwiseFunc( |
| 1335 | + "logical_xor", |
| 1336 | + ti._logical_xor_result_type, |
| 1337 | + ti._logical_xor, |
| 1338 | + _logical_xor_docstring_, |
| 1339 | +) |
| 1340 | +del _logical_xor_docstring_ |
| 1341 | + |
1246 | 1342 | # U24: ==== LOGICAL_NOT (x) |
1247 | 1343 | _logical_not_docstring = r""" |
1248 | 1344 | logical_not(x, /, \*, out=None, order='K') |
|
0 commit comments