More than 4 dimensional arrays using F# - cannot initialize object
I play with HDF5DotNet (see http://hdf5.net/). There is a class H5Array
which has a lot of constructors of this kind:
new 'Type []
new 'Type [,]
new 'Type [,,]
new 'Type [,,]
new 'Type [,,,]
new 'Type [,,,,]
new 'Type [,,,,,]
...
I write
let data = Array2D.create 256 512 4.
let test = H5Array data
Even for a 2D array I get an error saying:
internal error: F# supports a maxiumum .NET array dimension of开发者_JS百科 4
My two questions are:
- How to make it work for the 2D data?
- How to make it work for more than 4 dimensional data?
Hm, for question #2, I expect you'd use Array.Create
http://msdn.microsoft.com/en-us/library/dfs8044k.aspx
to make arrays with large rank. But I wonder if #1 is a compiler bug?
精彩评论