Friendly FYI: I tried the first example without any luck.
>docker run -it pygraphblas/pygraphblas ipython
Python 3.7.4 (default, Jul 13 2019, 14:04:11)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.7.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from pygraphblas import Matrix
In [2]: m = Matrix.from_random(int, 3, 3, 3).apply(lambda x: mod(x, 10))
From cffi callback <function Matrix.apply.<locals>.op_func at 0x7f6a57c7bef0>:
Traceback (most recent call last):
File "/pygraphblas/pygraphblas/matrix.py", line 513, in op_func
z[0] = op(x[0])
File "<ipython-input-18-2d6fe893faad>", line 1, in <lambda>
NameError: name 'mod' is not defined
From cffi callback <function Matrix.apply.<locals>.op_func at 0x7f6a57c7bef0>:
Traceback (most recent call last):
File "/pygraphblas/pygraphblas/matrix.py", line 513, in op_func
z[0] = op(x[0])
File "<ipython-input-18-2d6fe893faad>", line 1, in <lambda>
NameError: name 'mod' is not defined
Friendly FYI: I tried the first example without any luck.