Skip to content
GitLab
菜单
项目
群组
代码片段
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录/注册
切换导航
菜单
打开侧边栏
NJU Geophy
MGPro
提交
08e79f2b
提交
08e79f2b
编辑于
7月 05, 2019
作者:
Mijian Xu
😷
浏览文件
Update mgpro.py
上级
f2bffb0b
流水线
#744
已失败 ,包含阶段
in 1 minute 和 1 second
变更
1
流水线
1
Hide whitespace changes
Inline
Side-by-side
mgpro/mgpro.py
浏览文件 @
08e79f2b
...
...
@@ -120,8 +120,8 @@ class mgmat(object):
grad
=
np
.
diff
(
data_expand
,
axis
=
1
)[
self
.
row_begin
:
self
.
row_end
+
1
,
self
.
col_begin
:
self
.
col_end
+
1
]
grad
/=
self
.
dx
elif
degree
==
'mod'
:
ns
=
-
np
.
diff
(
data_expand
,
axis
=
0
)[
self
.
row_begin
:
self
.
row_end
+
1
,
self
.
col_begin
:
self
.
col_end
+
1
]
we
=
np
.
diff
(
data_expand
,
axis
=
1
)[
self
.
row_begin
:
self
.
row_end
+
1
,
self
.
col_begin
:
self
.
col_end
+
1
]
ns
=
-
np
.
diff
(
data_expand
,
axis
=
0
)[
self
.
row_begin
:
self
.
row_end
+
1
,
self
.
col_begin
:
self
.
col_end
+
1
]
/
self
.
dy
we
=
np
.
diff
(
data_expand
,
axis
=
1
)[
self
.
row_begin
:
self
.
row_end
+
1
,
self
.
col_begin
:
self
.
col_end
+
1
]
/
self
.
dx
grad
=
np
.
sqrt
(
ns
**
2
+
we
**
2
)
elif
degree
==
'45'
:
grad
=
np
.
zeros_like
(
data_expand
)
...
...
编辑
预览
Supports
Markdown
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录