Compile RandomArray
- To: mathgroup at smc.vnet.net
- Subject: [mg72418] Compile RandomArray
- From: Alberto Verga <Alberto.Verga at laposte.net>
- Date: Wed, 27 Dec 2006 05:31:06 -0500 (EST)
Hi Compilation of the following function fails: cf1 = Compile[{{n, _Integer}}, Module[{dtn = 0.1, noise = RandomArray[NormalDistribution[0, 1], {n, n }]}, dtn Fourier[noise]], {{Fourier[_], _Complex, 2}}]; the same function with a table of Random[] numbers can be compiled without difficulty: cf = Compile[{{n, _Integer}}, Module[{dtn = 0.1, noise = Table[Random[Real, {-1, 1}], {n}, {n}]}, dtn Fourier[noise]], {{Fourier[_], _Complex, 2}}]; I tried several modifications of cf1 (adding information about RandomArray in a third argument of Compile[], for exampe) without success. Perhaps someone knows how to compile with 'external' functions like this one. Thanks, Alberto Verga