This commit is contained in:
guanjihuan 2025-02-26 15:42:52 +08:00
parent 5c055bfe8b
commit f41deb1d33
3 changed files with 12 additions and 2 deletions

View File

@ -1,7 +1,7 @@
[metadata] [metadata]
# replace with your username: # replace with your username:
name = guan name = guan
version = 0.1.148 version = 0.1.149
author = guanjihuan author = guanjihuan
author_email = guanjihuan@163.com author_email = guanjihuan@163.com
description = An open source python package description = An open source python package

View File

@ -1,6 +1,6 @@
Metadata-Version: 2.2 Metadata-Version: 2.2
Name: guan Name: guan
Version: 0.1.148 Version: 0.1.149
Summary: An open source python package Summary: An open source python package
Home-page: https://py.guanjihuan.com Home-page: https://py.guanjihuan.com
Author: guanjihuan Author: guanjihuan

View File

@ -86,6 +86,16 @@ def run(function_name, *args, **kwargs):
pass pass
return return_data return return_data
# 获取矩阵的维度考虑单一数值的矩阵维度为1
def dimension_of_array(array):
import numpy as np
array = np.array(array)
if array.shape==():
dim = 1
else:
dim = array.shape[0]
return dim
# 将XYZ数据转成矩阵数据说明x_array/y_array的输入和输出不一样。要求z_array数据中y对应的数据为小循环x对应的数据为大循环 # 将XYZ数据转成矩阵数据说明x_array/y_array的输入和输出不一样。要求z_array数据中y对应的数据为小循环x对应的数据为大循环
def convert_xyz_data_into_matrix_data(x_array, y_array, z_array): def convert_xyz_data_into_matrix_data(x_array, y_array, z_array):
import numpy as np import numpy as np