Jelly, 9 bytes
,ZfJṁ=ⱮJƲ
Idea stolen from Razetime in TNB
, Pair the input with
Z its transpose.
f Ʋ Filter the pair to elements contained in:
Jṁ=ⱮJƲ every matrix of the same dimensions with a single column of 1s.
Jṁ Mold [1 .. len(input)] to the shape of the input.
ⱮJ For each 1 .. len(input),
= is each element equal to it?
Jṁ=ⱮJƲ This computes every matrix of the same dimensions with a single column of 1s.
Jelly, 9 bytes
,ZfJṁ=ⱮJƲ
Idea stolen from Razetime in TNB
, Pair the input with
Z its transpose.
f Ʋ Filter the pair to elements contained in:
Jṁ Mold [1 .. len(input)] to the shape of the input.
ⱮJ For each 1 .. len(input),
= is each element equal to it?
Jṁ=ⱮJƲ This computes every matrix of the same dimensions with a single column of 1s.
Jelly, 9 bytes
,ZfJṁ=ⱮJƲ
Idea stolen from Razetime in TNB
, Pair the input with
Z its transpose.
f Filter the pair to elements contained in
Jṁ=ⱮJƲ every matrix of the same dimensions with a single column of 1s.
Jṁ Mold [1 .. len(input)] to the shape of the input.
ⱮJ For each 1 .. len(input),
= is each element equal to it?
Jelly, 9 bytes
,ZfJṁ=ⱮJƲ
Idea stolen from Razetime in TNBIdea stolen from Razetime in TNB
, Pair the input with
Z its transpose.
f Ʋ Filter the pair to elements contained in:
Jṁ Mold [1 .. len(input)] to the shape of the input.
ⱮJ For each 1 .. len(input),
= is each element equal to it?
Jṁ=ⱮJƲ This computes every matrix of the same dimensions with a single column of 1s.
Jelly, 9 bytes
,ZfJṁ=ⱮJƲ
Idea stolen from Razetime in TNB
, Pair the input with
Z its transpose.
f Ʋ Filter the pair to elements contained in:
Jṁ Mold [1 .. len(input)] to the shape of the input.
ⱮJ For each 1 .. len(input),
= is each element equal to it?
Jṁ=ⱮJƲ This computes every matrix of the same dimensions with a single column of 1s.