开发者

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:

  1. How to make it work for the 2D data?
  2. 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜