Premium problem153. Classify Each Indexing Form as View or Copy

Medium Locked

Given a 2-D int array A, return a tuple of six booleans saying whether each of these shares memory with A, in order:

  • A[::2]
  • A[[0,2]]
  • A[A>3]
  • A.T
  • A.reshape(-1)
  • A.T.reshape(-1)

Input

[[ 0  1  2  3]
 [ 4  5  6  7]
 [ 8  9 10 11]]

Output

(True, False, False, True, True, False)

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)