Is it possible to generate a numpy matrix with a circular pattern of “1”s in a rest matrix of “0”s? So basically a
generate(ysize, xsize, ycenter, xcenter, radius)
Should look something like
[000000000]
[000000000]
[000001000]
[000011100]
[000111110]
[000011100]
[000001000]
[000000000]
(ok this looks stupid but on a 1000×1000 scale it would make sense)
Is there such a possibility in numpy?
1 Answer