Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    # we need the first (and only one at this case) output as PDL array
    print "output: ".$exe->outputs->[0]->aspdl."\n";
    
  2. or download this
    # 2d array data, initialised to these rows (edit: updated to specify c
    +tx too)
    my $a_data = mx->nd->array([[1,2],[3,4]], ctx => $ctx);
    my $b_data = mx->nd->array([[5,6],[7,8]], ctx => $ctx);
    my $c_data = mx->nd->array([[9,10],[11,12]], ctx => $ctx);
    my $d_data = mx->nd->array([[13,14],[15,16]], ctx => $ctx);
    
  3. or download this
    [
     [286 308]
     [366 396]
    ]