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

Inconsistent type conversions for trigonometric functions #626

Open
dionhaefner opened this issue Jun 3, 2019 · 0 comments
Open

Inconsistent type conversions for trigonometric functions #626

dionhaefner opened this issue Jun 3, 2019 · 0 comments

Comments

@dionhaefner
Copy link
Collaborator

Example:

>>> import numpy as np

>>> np.arctanh(np.array([0], dtype='int8')).dtype
dtype('float16')

>>> np.arctanh(np.array([0], dtype='int16')).dtype
dtype('float32')

>>> np.arctanh(np.array([0], dtype='int32')).dtype
dtype('float64')

vs.

>>> import bohrium as bh

>>> bh.arctanh(bh.array([0], dtype='int8')).dtype
dtype('float32')

>>> bh.arctanh(bh.array([0], dtype='int16')).dtype
dtype('float32')

>>> bh.arctanh(bh.array([0], dtype='int32')).dtype
dtype('float32')

Functions showing this behavior:

[
    'sin',
    'cos',
    'tan',
    'sinh',
    'cosh',
    'tanh',
    'arcsin',
    'arccos',
    'arctan',
    'arcsinh',
    'arccosh',
    'arctanh'
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant