-
Notifications
You must be signed in to change notification settings - Fork 23
FULL add kernel #558
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
FULL add kernel #558
Conversation
I think that there is a more common solution for functions like |
Almost, except that |
@@ -84,6 +85,28 @@ cpdef dparray dpnp_diag(v, k): | |||
return result | |||
|
|||
|
|||
cpdef dparray dpnp_full(result_shape, value_in, result_dtype): | |||
""" Convert string type names (dparray.dtype) to C enum DPNPFuncType """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""" Convert string type names (dparray.dtype) to C enum DPNPFuncType """ | |
# Convert string type names (dparray.dtype) to C enum DPNPFuncType |
Please use comment sign for comments otherwise Cython converts this to strings from src.
dpnp/dpnp_iface_arraycreation.py
Outdated
|
||
_dtype = dtype if dtype is not None else type(fill_value) | ||
if not use_origin_backend(): | ||
if order != 'C': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if order != 'C': | |
if order is not 'C': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally strings in Python are compared by value, not identity. I have one example which shows a potential issue:
a = 'hi'
b = ''.join(['h', 'i'])
a == b # True
a is b # False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@densmirn in this PR you also moving some functional code (without changing) from one src to another, for future please do this kind of refactoring on separate PRs. PR must have one logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.