| Download
Project: Peter's Files
Views: 3893Visibility: Unlisted (only visible to those who know the link)
Image: ubuntu1804Kernel: Python 3 (system-wide)
Test Points as Pixels and Shade
In [1]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-468c2947ab96> in <module>
3 from PIL import Image
4 import math
----> 5 from numba import njit
~/.local/lib/python3.6/site-packages/numba/__init__.py in <module>
43
44 # Initialize typed containers
---> 45 import numba.typed
46
47 # Keep this for backward compatibility.
~/.local/lib/python3.6/site-packages/numba/typed/__init__.py in <module>
1 from __future__ import absolute_import
2
----> 3 from .typeddict import Dict
4 from .typedlist import List
~/.local/lib/python3.6/site-packages/numba/typed/typeddict.py in <module>
16
17
---> 18 @njit
19 def _make_dict(keyty, valty):
20 return dictobject._as_meminfo(dictobject.new_dict(keyty, valty))
~/.local/lib/python3.6/site-packages/numba/decorators.py in njit(*args, **kws)
222 warnings.warn('forceobj is set for njit and is ignored', RuntimeWarning)
223 kws.update({'nopython': True})
--> 224 return jit(*args, **kws)
225
226
~/.local/lib/python3.6/site-packages/numba/decorators.py in jit(signature_or_function, locals, target, cache, pipeline_class, **options)
159 targetoptions=options, **dispatcher_args)
160 if pyfunc is not None:
--> 161 return wrapper(pyfunc)
162 else:
163 return wrapper
~/.local/lib/python3.6/site-packages/numba/decorators.py in wrapper(func)
175 disp = dispatcher(py_func=func, locals=locals,
176 targetoptions=targetoptions,
--> 177 **dispatcher_args)
178 if cache:
179 disp.enable_caching()
~/.local/lib/python3.6/site-packages/numba/dispatcher.py in __init__(self, py_func, locals, targetoptions, impl_kind, pipeline_class)
574 """
575 self.typingctx = self.targetdescr.typing_context
--> 576 self.targetctx = self.targetdescr.target_context
577
578 pysig = utils.pysignature(py_func)
~/.local/lib/python3.6/site-packages/numba/targets/registry.py in target_context(self)
48 return nested
49 else:
---> 50 return self._toplevel_target_context
51
52 @property
~/.local/lib/python3.6/site-packages/numba/utils.py in __get__(self, instance, type)
379 if instance is None:
380 return self
--> 381 res = instance.__dict__[self.name] = self.func(instance)
382 return res
383
~/.local/lib/python3.6/site-packages/numba/targets/registry.py in _toplevel_target_context(self)
32 def _toplevel_target_context(self):
33 # Lazily-initialized top-level target context, for all threads
---> 34 return cpu.CPUContext(self.typing_context)
35
36 @utils.cached_property
~/.local/lib/python3.6/site-packages/numba/targets/base.py in __init__(self, typing_context)
248
249 # Initialize
--> 250 self.init()
251
252 def init(self):
~/.local/lib/python3.6/site-packages/numba/compiler_lock.py in _acquire_compile_lock(*args, **kwargs)
30 def _acquire_compile_lock(*args, **kwargs):
31 with self:
---> 32 return func(*args, **kwargs)
33 return _acquire_compile_lock
34
~/.local/lib/python3.6/site-packages/numba/targets/cpu.py in init(self)
47 def init(self):
48 self.is32bit = (utils.MACHINE_BITS == 32)
---> 49 self._internal_codegen = codegen.JITCPUCodegen("numba.exec")
50
51 # Add ARM ABI functions from libgcc_s
~/.local/lib/python3.6/site-packages/numba/targets/codegen.py in __init__(self, module_name)
610 self._llvm_module.name = "global_codegen_module"
611 self._rtlinker = RuntimeLinker()
--> 612 self._init(self._llvm_module)
613
614 def _init(self, llvm_module):
~/.local/lib/python3.6/site-packages/numba/targets/codegen.py in _init(self, llvm_module)
619 self._tm_features = self._customize_tm_features()
620 self._customize_tm_options(tm_options)
--> 621 tm = target.create_target_machine(**tm_options)
622 engine = ll.create_mcjit_compiler(llvm_module, tm)
623
TypeError: create_target_machine() got an unexpected keyword argument 'jitdebug'
In [3]:
Simple
In [4]:
In [5]:
ALA
In [6]:
In [7]:
Mandelbrot
In [12]:
In [24]:
In [25]:
In [26]:
Weird Lanscape
In [0]:
In [324]:
In [326]:
Different
In [80]:
In [81]:
In [82]:
In [83]:
mand like
In [11]:
File "<ipython-input-11-532ee8634d66>", line 9
return (255,255,255) madLikeColor(i + 1)
^
SyntaxError: invalid syntax
In [12]:
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-12-4c24182b474e> in <module>()
1 like = shade(mandLike, dpi=50, bounds = (-10,10,-10,10))
----> 2 like.fill()
<ipython-input-2-e1cf7f3db49b> in fill(self)
21 while self.h < self.width:
22 while self.k < self.height:
---> 23 self.pixels[self.h,self.k] = self.testFunction(*self._scale_to_plane(self.h,self.k))
24 self.k += 1
25 self.h += 1
KeyboardInterrupt:
In [10]:
In [0]: