[SciPy-User] Can I get the "rings" of a 2D array?
Mon Apr 12 21:23:00 CDT 2010
On Mon, Apr 12, 2010 at 5:16 PM, Charles R Harris
> On Mon, Apr 12, 2010 at 4:55 PM, Jeremy Conlin <firstname.lastname@example.org> wrote:
>> I need to get the "rings" of a 2D array; i.e. the first ring would be
>> the first and last column in addition to the first and last row, the
>> second ring would be the second and second-from-last row and the
>> second and second-from-last column---except for what is not in the
>> first ring. Is there a way to slice an array to get this data?
> So will the rings be different sizes or all the same size with the other
> elements zeroed?
Good question. The better option would be to keep the size of the
array the same and zero all the other elements.
More information about the SciPy-User