To partially answer my own question --- I just hadn't thought of this alternative route before --- the following seems to do it:
X = pointer_to_array(Xpy.data, (Xpy.dims[2], Xpy.dims[1]), false) Are there any concerns associated with this other than the risk that Python might free the allocated memory associated with that pointer? On Friday, 9 September 2016 13:33:09 UTC+1, Christoph Ortner wrote: > > It now looks to me like the "problem" is with Python, not with PyCall; I > thought the assignment pyobj.X = X would be by reference, but apparently > it makes a copy ?!? > > Alternatively, to achieve what I want I could do > Xpy = PyArray( pyobj.X ) > > Now Xpy is really a reference to the array I want to manipulate. How can > I now "reinterpret" Xpy (i.e. the block of memory) as a Julia Array, or > other Julia data structure - specifically I want a Vector of FixedSizeArray > ? > > Thank you. > > On Friday, 9 September 2016 13:18:58 UTC+1, Christoph Ortner wrote: >> >> Sorry - I was rushing when I wrote this. What I meant was: after the >> assignment pyobj["X"] = Xpy, if I modify X in-place, this modification does >> not seem to propagate to pyobj.X. I will try to put together an example. >> >> >>