Premium problem43. Make an Array Read-Only

Medium Locked

Make a copy of Z immutable, then attempt to write to it. Return the tuple (raised, frozen), where raised says whether the write raised an error and frozen is the read-only copy itself.

Input

[0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]

Output

(True, array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]))

Premium problem

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

Implement solve(...)