commands → randomtensor

randomtensor(l,m,n,z); randomtensor(l,m,n,z,p);

The randomtensor command generates an l by m by n tensor of a random integers x with 0 <= x < z. If a fifth argument p is given, it is the probability that an integer is generated.

Examples

randomtensor(1,2,3,10);
	[[[2, 5, 9], [6, 4, 1]]]