node-julia icon indicating copy to clipboard operation
node-julia copied to clipboard

Failed with Typed Array allocated by V8 as input argument

Open complyue opened this issue 9 years ago • 0 comments

Typed array as input argument works correctly if returned from Julia:

> var a=julia.eval('[1.1,2.2,3.3]'); a
Float64Array [ 1.1, 2.2, 3.3 ]
> julia.exec('identity',a)
Float64Array [ 1.1, 2.2, 3.3 ]
>

But if created by V8:

> a=new Float64Array([1.1,2.2,3.3]),a
Float64Array [ 1.1, 2.2, 3.3 ]
> julia.exec('identity',a)
Float64Array [ 0, 0, 3.2999999999883594 ]
> 

Test env FYI.

cymp:datatags cyue$ uname -a
Darwin cymp.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
cymp:datatags cyue$ node
> process.version
'v6.2.2'
> const julia=require('node-julia')
undefined
> julia.eval('VERSION')
JRef { build: null, major: 0, minor: 4, patch: 6, prerelease: null }
> 

complyue avatar Jul 08 '16 07:07 complyue