briangu / klongpy

High-Performance Klong array language in Python.

Home Page:http://klongpy.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nested arrays not parsing correctly

briangu opened this issue · comments

It appears the tests are letting certain nested array patterns pass because we also "corrupt" the expect response to match the processed result:

[[0] [[1]]] => [[0] [1]]
,/[[0] [[1]]] ==> [0 1]

this appears to be due to the way np.array(x,dtype=object) flattens arrays when it forms the NumPy array. However, fixing this exposes the underlying interpreter dependency on array's being data and lists being "programs". This is great, actually, since it forces the "bubble" to be closed on core behavior relative to NumPy arrays. Ideally, we want to be as close to a NumPy processor as possible, yielding natural NumPy arrays. So how read_list behaves affects the interpreter as well as the output.

Note: It appears this issue has been around a while, so not a new change.