I don't know "best", but a quick way is $pdl = byte ( random(100,100) < 0.5 );
I don't think there's any planned support for packed bit fields, since most platforms make them very inconvenient compared to bytes. On Sep 9, 2013, at 12:43 PM, mraptor <[email protected]> wrote: > Hi, > > what is the best way to fill 2D pdl randomly with zeros and ones...say I have > the following PDL : > > $pdl = pdl zeros(byte,100,100) > > PS> Just to be on the safe side, let me ask.. byte is the smallest type > supported, there wont be by some coincidence support for something like this : > > $pdl = pdl zeros(bit,100,100) > > ;) thanks > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
