Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`fold` primitive does not support NumPy arrays. #929

rtohid opened this issue Apr 5, 2019 · 0 comments


Copy link

commented Apr 5, 2019

from phylanx import Phylanx
import numpy as np

def fldl(elements, initial):
    return fold_left(lambda a, b : a + b, initial, elements)

print(fldl(np.array([1, 2, 3]), 0))

returns [1, 2, 3] instead of 6- The same is true for fold_right.

@rtohid rtohid added this to the 0.0.1 milestone Apr 5, 2019

@rtohid rtohid added this to To Do in Primitives via automation Apr 5, 2019

@hkaiser hkaiser closed this in #932 Apr 10, 2019

Primitives automation moved this from To Do to Done Apr 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.