time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (1039B)


      1 
      2 {{alias}}( x, y )
      3     Converts an input array to the same data type as a second input array.
      4 
      5     The function supports input arrays having the following data types:
      6 
      7     - float32: single-precision floating-point numbers.
      8     - float64: double-precision floating-point numbers.
      9     - generic: values of any type.
     10     - int16: signed 16-bit integers.
     11     - int32: signed 32-bit integers.
     12     - int8: signed 8-bit integers.
     13     - uint16: unsigned 16-bit integers.
     14     - uint32: unsigned 32-bit integers.
     15     - uint8: unsigned 8-bit integers.
     16     - uint8c: unsigned clamped 8-bit integers.
     17 
     18     Parameters
     19     ----------
     20     x: Array|TypedArray
     21         Array to convert.
     22 
     23     y: Array|TypedArray
     24         Array having desired output data type.
     25 
     26     Returns
     27     -------
     28     out: Array|TypedArray
     29         Output array.
     30 
     31     Examples
     32     --------
     33     > var x = [ 1.0, 2.0, 3.0, 4.0 ];
     34     > var y = new {{alias:@stdlib/array/float32}}( 0 );
     35     > var out = {{alias}}( x, y )
     36     <Float32Array>[ 1.0, 2.0, 3.0, 4.0 ]
     37 
     38     See Also
     39     --------
     40