[Scilab-Dev] SEP 064: HDF5 Scilab specification

Sylvestre Ledru sylvestre.ledru at scilab.org
Fri May 27 10:43:40 CEST 2011


Le mercredi 25 mai 2011 à 20:53 +0200, Samuel GOUGEON a écrit :
> Hello Sylvestre,
> 
> Taking some time to read completely the SEP, i would have some remarks
> on some specific points of it:
> 
> * (head of page 2) Several “types” are based on tlist or mlist. It is
> the case of rational, 
> state-space, hypermat and struct.They are therefor transparently
> saved. 
> => What about the missing cell datatype ? (this one is presently also
> a predefined mlist() type, 
> isn't it? 
I forgot it.

> But there will be some changes in Scilab 6 about cells. So...a new
> full type?)
Yes.

> * (2 lines before 3.2) If the variable is primitive and without
> complex values associated, ... 
> By primitive, you are not speaking about a pointer to a primitive
> (function), are you?
primitive type (double, boolean, string...). Type which are not
"recursive".

> * 3.2.1 Example. After the screenshot of the table, you mention
> hdfview. 
> Is it a new editor, distinct from browsevar ? Couldn't browsevar be
> extended, 
> instead of being bypassed/duplicated?
hdfview is a software provided by the hdf group:
http://www.hdfgroup.org/hdf-java-html/hdfview/


> * (the main concern) In 3.3, you describe the specific role of the #
> char. 
> Now, # in an authorized heading as well as building char in names of
> variables.
> Couldn't this be of concern, for instance when "decoding" the nesting
> level of
> hierarchical data with names including some #?
No, it is managed by the load.


> * 3.3.1 sparse (1 line before 3.3.2: 
> #2# reference a matrix of double which contains 1.0; 3.0; 2.0 
> => (i am underlying) Apparently, sparse with complex numbers won't be
> supported.
> Do you confirm that?
Heuu, it was just an example here. ;)
I updated the sentence to avoid the confusion.

It is already working:
-->dense=[0., 1., 0., 0., 0.,
-->1., 0., 2., 0., 0.
-->0., 0., 0., 0., 0.
-->0., 0., 0., 0., -0.5];
 
-->sp=sparse(dense*(1+2*%i))
 sp  =
 
(    4,    5) sparse matrix
 
(    1,    2)       1. + 2.i 
(    2,    1)       1. + 2.i 
(    2,    3)       2. + 4.i 
(    4,    5)     - 0.5 - 1.i 
 
-->export_to_hdf5("/tmp/plop.h5","sp")

-->import_from_hdf5("/tmp/plop.h5")
 ans  =
 
  T  
 
-->sp
 sp  =
 
(    4,    5) sparse matrix
 
(    1,    2)       1. + 2.i 
(    2,    1)       1. + 2.i 
(    2,    3)       2. + 4.i 
(    4,    5)     - 0.5 - 1.i 


> * 3.3.2 Boolean sparse: A typo:
>      While a sparse has 3 datasets, the sparse has only 2 ...
> => While a sparse has 3 datasets, the boolean sparse has only 2... 
Bien vu!
Merci

It is under review here:
http://codereview.scilab.org/4142

Sylvestre




More information about the dev mailing list