@@ -273,6 +273,17 @@ macro_rules! binary_func {
273
273
#[ doc=$doc_str]
274
274
///
275
275
/// This is an element wise binary operation.
276
+ ///
277
+ /// # Important Notes
278
+ ///
279
+ /// - If shape/dimensions of `lhs` and `rhs` are same, the value of `batch` parameter
280
+ /// has no effect.
281
+ ///
282
+ /// - If shape/dimensions of `lhs` and `rhs` are different, the value of `batch` has
283
+ /// to be set to `true`. In this case, the shapes of `lhs` and `rhs` have to satisfy the
284
+ /// following criteria:
285
+ /// - Same number of elements in `lhs` and `rhs` along a given dimension/axis
286
+ /// - Only one element in `lhs` or `rhs` along a given dimension/axis
276
287
pub fn $fn_name<A , B >( lhs: & Array <A >, rhs: & Array <B >, batch: bool ) -> Array <A :: Output >
277
288
where
278
289
A : HasAfEnum + ImplicitPromote <B >,
@@ -434,9 +445,18 @@ macro_rules! overloaded_binary_func {
434
445
///
435
446
/// An Array with results of the binary operation.
436
447
///
437
- ///# Note
448
+ ///# Important Notes
449
+ ///
450
+ /// - If shape/dimensions of `arg1` and `arg2` are same, the value of `batch` parameter
451
+ /// has no effect.
452
+ ///
453
+ /// - If shape/dimensions of `arg1` and `arg2` are different, the value of `batch` has
454
+ /// to be set to `true`. In this case, the shapes of `arg1` and `arg2` have to satisfy the
455
+ /// following criteria:
456
+ /// - Same number of elements in `arg1` and `arg2` along a given dimension/axis
457
+ /// - Only one element in `arg1` or `arg2` along a given dimension/axis
438
458
///
439
- /// The trait `Convertable` essentially translates to a scalar native type on rust or Array.
459
+ /// - The trait `Convertable` essentially translates to a scalar native type on rust or Array.
440
460
pub fn $fn_name<T , U >(
441
461
arg1: & T ,
442
462
arg2: & U ,
@@ -530,9 +550,19 @@ macro_rules! overloaded_compare_func {
530
550
///# Return Values
531
551
///
532
552
/// An Array with results of the comparison operation a.k.a an Array of boolean values.
533
- ///# Note
534
553
///
535
- /// The trait `Convertable` essentially translates to a scalar native type on rust or Array.
554
+ ///# Important Notes
555
+ ///
556
+ /// - If shape/dimensions of `arg1` and `arg2` are same, the value of `batch` parameter
557
+ /// has no effect.
558
+ ///
559
+ /// - If shape/dimensions of `arg1` and `arg2` are different, the value of `batch` has
560
+ /// to be set to `true`. In this case, the shapes of `arg1` and `arg2` have to satisfy the
561
+ /// following criteria:
562
+ /// - Same number of elements in `arg1` and `arg2` along a given dimension/axis
563
+ /// - Only one element in `arg1` or `arg2` along a given dimension/axis
564
+ ///
565
+ /// - The trait `Convertable` essentially translates to a scalar native type on rust or Array.
536
566
pub fn $fn_name<T , U >(
537
567
arg1: & T ,
538
568
arg2: & U ,
@@ -632,9 +662,18 @@ where
632
662
///
633
663
/// An Array with results of the binary operation.
634
664
///
635
- /// # Note
665
+ /// # Important Notes
666
+ ///
667
+ /// - If shape/dimensions of `arg1` and `arg2` are same, the value of `batch` parameter
668
+ /// has no effect.
669
+ ///
670
+ /// - If shape/dimensions of `arg1` and `arg2` are different, the value of `batch` has
671
+ /// to be set to `true`. In this case, the shapes of `arg1` and `arg2` have to satisfy the
672
+ /// following criteria:
673
+ /// - Same number of elements in `arg1` and `arg2` along a given dimension/axis
674
+ /// - Only one element in `arg1` or `arg2` along a given dimension/axis
636
675
///
637
- /// The trait `Convertable` essentially translates to a scalar native type on rust or Array.
676
+ /// - The trait `Convertable` essentially translates to a scalar native type on rust or Array.
638
677
pub fn clamp < T , C > (
639
678
input : & Array < T > ,
640
679
arg1 : & C ,
0 commit comments