time-to-botec

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

repl.txt (827B)


      1 
      2 {{alias}}( value )
      3     Tests if a value is a 2-dimensional ndarray-like object.
      4 
      5     Parameters
      6     ----------
      7     value: any
      8         Value to test.
      9 
     10     Returns
     11     -------
     12     bool: boolean
     13         Boolean indicating whether a value is a 2-dimensional ndarray-like
     14         object.
     15 
     16     Examples
     17     --------
     18     > var M = {};
     19     > M.data = [ 0, 0, 0, 0 ];
     20     > M.ndims = 2;
     21     > M.shape = [ 2, 2 ];
     22     > M.strides = [ 2, 1 ];
     23     > M.offset = 0;
     24     > M.order = 'row-major';
     25     > M.dtype = 'generic';
     26     > M.length = 4;
     27     > M.flags = {};
     28     > M.get = function get( i, j ) {};
     29     > M.set = function set( i, j ) {};
     30     > var bool = {{alias}}( M )
     31     true
     32     > bool = {{alias}}( [ 1, 2, 3, 4 ] )
     33     false
     34     > bool = {{alias}}( 3.14 )
     35     false
     36     > bool = {{alias}}( {} )
     37     false
     38 
     39     See Also
     40     --------
     41