Giter Site home page Giter Site logo

Comments (3)

jriehl avatar jriehl commented on August 24, 2024

Unary negation should be fixed now, and should be available in the repository head. Unary inversion and not operators are still not working.

from numba.

jriehl avatar jriehl commented on August 24, 2024

No further comments seen. All tests in numba.tests.test_unary_ops are now passing as of commit d299f48, closing.

from numba.

mforbes avatar mforbes commented on August 24, 2024

This still fails for complex numbers (numba 0.11.0-3-gea20d11):

from numba import *

@autojit
def g():
    a = 1j
    return -a

print g()
Traceback (most recent call last):
  File "complex.py", line 15, in <module>
    print g()
  File "numbawrapper.pyx", line 189, in numba.numbawrapper._NumbaSpecializingWrapper.__call__ (numba/numbawrapper.c:3724)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/wrapping/compiler.py", line 69, in compile_from_args
    return self.compile(signature)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/wrapping/compiler.py", line 88, in compile
    compiled_function = dec(self.py_func)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/decorators.py", line 224, in _jit_decorator
    nopython=nopython, func_ast=func_ast, **kwargs)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/decorators.py", line 133, in compile_function
    func_env = pipeline.compile2(env, func, restype, argtypes, func_ast=func_ast, **kwds)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/pipeline.py", line 144, in compile2
    post_ast = pipeline(func_ast, env)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/pipeline.py", line 191, in __call__
    ast = self.transform(ast, env)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/pipeline.py", line 656, in transform
    ast = stage(ast, env)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/pipeline.py", line 641, in _stage
    return _check_stage_object(stage_obj)(ast, env)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/pipeline.py", line 202, in __call__
    reporting.report(env, exc=e)
  File "/Users/mforbes/.anaconda/lib/python2.7/site-packages/numba/reporting.py", line 181, in report
    raise exc
numba.error.NumbaError: (see below)
--------------------- Numba Encountered Errors or Warnings ---------------------
    return -a
-----------^
Error 13:11: Unary operator <_ast.USub object at 0x105bd7b50>
--------------------------------------------------------------------------------

from numba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.