commands → randomtensor

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

The randomtensor command generates a 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(10,1,2,3);
	[[[2, 5, 9], [6, 4, 1]]]