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

[Fea] Add fractional diff #702

Merged

Conversation

HydrogenSulfate
Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate commented Dec 15, 2023

PR types

New features

PR changes

APIs

Describe

  1. 添加基于 Caputo_fractional_derivative 定义的一维分数阶微分功能fractional_diff 和对应文档
  2. 移动与 gaussian_integrate 相关的函数至其函数内部,并加入积分上下限相反时对结果取负数的判断逻辑

Copy link

paddle-bot bot commented Dec 15, 2023

Thanks for your contribution!

@HydrogenSulfate HydrogenSulfate changed the title [Fea][WIP] Add fractional diff [Fea] Add fractional diff Dec 15, 2023
def gaussian_integrate(
fn: Callable, dim: int, N: int, integration_domains: List[List[float]]
fn: Callable[[Any], paddle.Tensor],
Copy link
Collaborator

Choose a reason for hiding this comment

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

对应的docstring一起改下

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已更新


def _calculate_grid(
N: int,
integration_domains,
Copy link
Collaborator

Choose a reason for hiding this comment

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

添加类型提示

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已添加

Copy link
Collaborator

@zhiminzhang0830 zhiminzhang0830 left a comment

Choose a reason for hiding this comment

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

LGTM

@HydrogenSulfate HydrogenSulfate merged commit 1cec6fb into PaddlePaddle:develop Dec 18, 2023
3 of 4 checks passed
@HydrogenSulfate HydrogenSulfate deleted the add_fractional_diff branch December 18, 2023 08:17
huohuohuohuohuo123 pushed a commit to huohuohuohuohuo123/PaddleScience that referenced this pull request Aug 12, 2024
* add fractional diff

* refine code

* fix(test=document_fix)
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

Successfully merging this pull request may close these issues.

2 participants