Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Oct 31, 2023
1 parent cae3de7 commit 9181fa8
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions base/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import bbinary2d = require( './../../../base/broadcasted-binary2d' );
import bbinary3d = require( './../../../base/broadcasted-binary3d' );
import bbinary4d = require( './../../../base/broadcasted-binary4d' );
import bbinary5d = require( './../../../base/broadcasted-binary5d' );
import bternary2d = require( './../../../base/broadcasted-ternary2d' );
import bunary2d = require( './../../../base/broadcasted-unary2d' );
import bunary3d = require( './../../../base/broadcasted-unary3d' );
import bunary4d = require( './../../../base/broadcasted-unary4d' );
Expand Down Expand Up @@ -86,6 +87,7 @@ import ones5d = require( './../../../base/ones5d' );
import onesnd = require( './../../../base/onesnd' );
import setter = require( './../../../base/setter' );
import take = require( './../../../base/take' );
import ternary2d = require( './../../../base/ternary2d' );
import toAccessorArray = require( './../../../base/to-accessor-array' );
import unary2d = require( './../../../base/unary2d' );
import unary2dBy = require( './../../../base/unary2d-by' );
Expand Down Expand Up @@ -583,6 +585,44 @@ interface Namespace {
*/
bbinary5d: typeof bbinary5d;

/**
* Applies a ternary callback to elements in three broadcasted input arrays and assigns results to elements in a two-dimensional nested output array.
*
* ## Notes
*
* - The input array shapes must be broadcast compatible with the output array shape.
*
* @param arrays - array containing three input nested arrays and one output nested array
* @param shapes - array shapes
* @param fcn - ternary callback
*
* @example
* var ones2d = require( `@stdlib/array/base/ones2d` );
* var zeros2d = require( `@stdlib/array/base/zeros2d` );
*
* function add( x, y, z ) {
* return x + y + z;
* }
*
* var shapes = [
* [ 1, 2 ],
* [ 2, 1 ],
* [ 1, 1 ],
* [ 2, 2 ]
* ];
*
* var x = ones2d( shapes[ 0 ] );
* var y = ones2d( shapes[ 1 ] );
* var z = ones2d( shapes[ 2 ] );
* var out = zeros2d( shapes[ 3 ] );
*
* ns.bternary2d( [ x, y, z, out ], shapes, add );
*
* console.log( out );
* // => [ [ 3.0, 6.0 ], [ 9.0, 12.0 ] ]
*/
bternary2d: typeof bternary2d;

/**
* Applies a unary callback to elements in a broadcasted nested input array and assigns results to elements in a two-dimensional nested output array.
*
Expand Down Expand Up @@ -1627,6 +1667,39 @@ interface Namespace {
*/
take: typeof take;

/**
* Applies a ternary callback to elements in three two-dimensional nested input arrays and assigns results to elements in a two-dimensional nested output array.
*
* ## Notes
*
* - The function assumes that the input and output arrays have the same shape.
*
* @param arrays - array containing three input nested arrays and one output nested array
* @param shape - array shape
* @param fcn - ternary callback
*
* @example
* var ones2d = require( `@stdlib/array/base/ones2d` );
* var zeros2d = require( `@stdlib/array/base/zeros2d` );
*
* function add( x, y, z ) {
* return x + y + z;
* }
*
* var shape = [ 2, 2 ];
*
* var x = ones2d( shape );
* var y = ones2d( shape );
* var z = ones2d( shape );
* var out = zeros2d( shape );
*
* ns.ternary2d( [ x, y, z, out ], shape, add );
*
* console.log( out );
* // => [ [ 3.0, 3.0 ], [ 3.0, 3.0 ] ]
*/
ternary2d: typeof ternary2d;

/**
* Converts an array-like object to a minimal array-like object supporting the accessor protocol.
*
Expand Down

0 comments on commit 9181fa8

Please sign in to comment.