Skip to content

Failed with Typed Array allocated by V8 as input argument #33

@complyue

Description

@complyue

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 }
> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions