---------------------------------------------------------------------------
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "<ipython-input-38-9fdeef156ad8>", line 6, in sphere_volume
a_bool = np.sum(np.square(a), axis=1) < 1
UnboundLocalError: local variable 'a' referenced before assignment
"""
The above exception was the direct cause of the following exception:
UnboundLocalError Traceback (most recent call last)
<ipython-input-48-87a3c8f3efae> in <module>()
4 v = p.starmap(
5 sphere_volume,
----> 6 args
7 )
8 print(sum(v) / n * 8 / (4/3*np.pi))
/opt/conda/lib/python3.6/multiprocessing/pool.py in starmap(self, func, iterable, chunksize)
272 `func` and (a, b) becomes func(a, b).
273 '''
--> 274 return self._map_async(func, iterable, starmapstar, chunksize).get()
275
276 def starmap_async(self, func, iterable, chunksize=None, callback=None,
/opt/conda/lib/python3.6/multiprocessing/pool.py in get(self, timeout)
642 return self._value
643 else:
--> 644 raise self._value
645
646 def _set(self, i, obj):
UnboundLocalError: local variable 'a' referenced before assignment