STEllAR-GROUP / phylanx

An Asynchronous Distributed C++ Array Processing Toolkit
Boost Software License 1.0
75 stars 76 forks source link

Function call weirdness #1244

Closed stevenrbrandt closed 4 years ago

stevenrbrandt commented 4 years ago

This program:

from phylanx import Phylanx
import numpy as np

@Phylanx
def fun(a):
    return a

@Phylanx
def foo():
    c = np.array([0, 1])
    print(fun(c[0]))
    x = c[0]
    y = fun(x)
    print(y)

foo()

Should print out 0 twice. Instead, it prints out this:

[0, 1]
0