Slicing in Masked Arrays (MA)


Are indexing and slicing treated differently in MA vs. Numeric?


Yes, they are, in that slices (that return non-scalar results) in MA return actual copies of the data while slices in Numeric return references. For a detailed description see the numarray manual's description of the difference. (The same answer applies to the version of MA bundled with Numeric.)

Notes: This discussion applies to the version of MA with Numeric 23.0.

Return to the Tips and Examples index page.

Updated: November 15, 2003 by Johnny Lin <email address>. License.