Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update docs for Universal Functions#1863

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
npolina4 wants to merge3 commits intomaster
base:master
Choose a base branch
Loading
fromupdate_ufunc
Draft

Conversation

@npolina4
Copy link
Contributor

Added new class for Universal Functions with full documentation that united unary and binary element-wise functions.
Updateddpnp.add anddpnp.abs functions for prototype for future element-wise functions.

All element-wise functions will be updated according to this prototype in the next PR.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you filing the PR as a draft?

@npolina4npolina4 requested a review fromantonwolfyMay 31, 2024 18:40
@github-actions
Copy link
Contributor

"--disable=redefined-builtin",
"--disable=unused-wildcard-import"
"--disable=unused-wildcard-import",
"--class-naming-style=snake_case"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

it would be better to updatepyproject.toml:

[tool.pylint.basic]include-naming-hint =trueclass-naming-style ="snake_case"

self.nin_=nin
_name="_"+name

dpt_result_type=getattr(ti,_name+"_result_type")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

How will it be propose to handle elementwise functions which are not present in dcptl? (likefabs which we will need to implement separately in dpnp)

returndpnp_array._create_from_usm_ndarray(res_usm)

@property
defnin(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We will need to add some tests to verify the attributes. Also to enable some relating third party tests.

Comment on lines 8 to +9
DPNP provides universal functions (a.k.a. ufuncs) to support various element-wise operations.
DPNP ufunc supports following features of NumPy’s one:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It would be better to reuse numpy like description here with a reference to numpy documentation at the end.

Parameters
----------
*x : {dpnp.ndarray, usm_ndarray}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

the autogenerated page is not properly describes arguments, like

param *x : Input arrays.
type *x : {dpnp.ndarray, usm_ndarray}

while expected a list underParameters:

Parameters: *x ({dpnp.ndarray, usm_ndarray}) -- ....

i.e. the style of description is different

ufunc()
Functions that operate element by element on whole arrays.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

missing a link to numpy.ufunc

Keyword arguments `where` and `subok` are supported with their default values.
Other keyword arguments is currently unsupported.
Otherwise ``NotImplementedError`` exception will be raised.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

what is about theAttributes section?

Other keyword arguments is currently unsupported.
Otherwise ``NotImplementedError`` exception will be raised.
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

due to some reason the whole description ofdpnp.ufunc.outer was inserted todpnp.ufunc page, but expected to have only summary per each method, likehere

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@antonwolfyantonwolfyantonwolfy left review comments

@vlad-perevezentsevvlad-perevezentsevAwaiting requested review from vlad-perevezentsevvlad-perevezentsev will be requested when the pull request is marked ready for reviewvlad-perevezentsev is a code owner

@ndgrigorianndgrigorianAwaiting requested review from ndgrigorianndgrigorian will be requested when the pull request is marked ready for reviewndgrigorian is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@npolina4@antonwolfy

[8]ページ先頭

©2009-2025 Movatter.jp