regarding the usage of slicing an array

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

regarding the usage of slicing an array

This post has NOT been accepted by the mailing list yet.

I once saw some code that tries to operate the multi-dimensional array as follows


I am not very clear about what does this mean. Then I try to experiment with it, say, I have a data array of shape (1,320,320,1), and just set c =0 and d=0. The resulting x has a shape of (1,0,0,1)

I just feel confused about what does data[:,c:-c,d:-d] try to do? Thanks.