Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing difference #7761

Open
sklam opened this issue Jan 18, 2022 · 0 comments
Open

Typing difference #7761

sklam opened this issue Jan 18, 2022 · 0 comments
Labels
bug - incorrect behavior Bugs: incorrect behavior easy

Comments

@sklam
Copy link
Member

sklam commented Jan 18, 2022

The following typing difference was reported by a user:

  1. divide int64 by float32 should yield float32
import numpy as np
import numba

a = np.array([1, 2, 3], dtype=np.int64)
b = np.array([4.4, 5.5, 6.6], dtype=np.float32)

def foo():
    return a / b


jit_foo = numba.njit(foo)

print(foo().dtype)
print(jit_foo().dtype)
  1. invert on boolean should yield integer.

So, this means there is no ~ on bools.

import numba

def foo(a):
    return ~a

jit_foo = numba.njit(foo)

print(foo(True))
print(jit_foo(True))
@sklam sklam added bug - incorrect behavior Bugs: incorrect behavior easy labels Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - incorrect behavior Bugs: incorrect behavior easy
Projects
Status: Timeboxed Issue tasks upto 1 hour
Development

No branches or pull requests

1 participant