First time here? Check out the FAQ!
answered 2023-05-27 05:55:31 +0100
Is this what you want?
r = 10 matrix(ZZ, r, lambda i, j: binomial(i+1, j) if j<=I else 0)
updated 2023-05-27 05:55:51 +0100
r = 10 matrix(ZZ, r, lambda i, j: binomial(i+1, j) if j<=I j<=i else 0)