Thanks for the suggestion @tom.  What were you thinking in regards to hooks?  Maybe like a signal handler that catches a sig error from the os?  I am a second year computer science student, so I am still learning, and not totally experienced with hooks.  A couple other students and I are working on this as a team.  Also, any suggestions how we could determine if the Tensor is in read only memory?  If you are dealing with a PyObject you can cast to PyArrayObject and check with PyArray_IsWriteable, but I don’t think that will work  with Tensor object.