There is a genuine confusion about what "dims" means: sometimes it refers to 
the size ("dimensions of a room") and sometimes it means the indices of 
particular coordinates ("the 2nd dimension"). We should strive to clarify this 
terminology.

--Tim

On Monday, March 17, 2014 07:27:40 PM J Luis wrote:
> Terça-feira, 18 de Março de 2014 1:45:32 UTC, Jameson escreveu:
> > This is a better question for julia-users, since it is a question of usage
> > that may be of more general interest.
> 
> Yes, sorry.
> 
> > unsafe_store!(a,b) is equivalent to setindex!(a,b) is equivalent to a[] =
> > b, which should help you see why the first call doesn't make sense
> > 
> > immutable types are immutable, you cannot get around that
> > 
> > there was recently an incorrect statement that types must be immutable to
> > be compatible with C. in fact, all types have the same C-like layout.
> > however, isbits types (a subset of immutable types) will be inlined into
> > an
> > Array, whereas a mutable type will not.
> > 
> > pointer_to_array takes a pointer and returns an array. Because the number
> > of dimensions is typically small (not 181*361=65000), the function only
> > allows passing tuples of dims. I'm not sure what you are trying to
> > accomplish.
> 
> Well I referred to it in another post. The manual is absolutely absent on
> what is dims at many functions where it is used and by trial and error I
> made this work at the reading function (see line 46 of
> https://github.com/ihnorton/GMT.jl/blob/master/src/GMT.jl). So I tried the
> same on writing.
> Basically, what I am trying to do in the inverse of what that grdread()
> function does. That is, tell GMT to allocate a container structure and fill
> it with the array data o later saving in file.

Reply via email to