Hi,
I'm attempting to use J in VisiData <https://github.com/saulpw/visidata>.
When testing api/python3 with this program:
import sys
sys.path.append('/home/raoul/Desktop/j903/addons/api/python3')
import jbase as jb
import numpy as np
jb.init(True)
def j_mean(vals):
jb.set('temp', np.array(vals))
e = jb.do('var=:(+/%#)temp')
r = jb.get('var')
return (r,e)
print(j_mean(list([1,2,3,4])))
Everything works as expected. But when trying to call 'j_mean' from
VisiData:
e = jb.do('var=:(+/%#)temp') yields error code 17 (file exists)
My understanding is that 'jbase.set' serializes its numpy array argument to
a file, and the problem is that this file is perhaps left lying around when
it shouldn't.
I know this is a rather vague question, but does anybody have an idea on
how to fix this? Or is the problem likely on the VisiData side?
Thanks!
Raoul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm