diff --git a/API_Reference.py b/API_Reference.py index 0383bee..f2def77 100644 --- a/API_Reference.py +++ b/API_Reference.py @@ -394,6 +394,9 @@ x_array, y_array, matrix = guan.read_two_dimensional_data(filename='a', file_for # 读取文件中的二维数据(第一行和列分别为横纵坐标)(支持复数形式) x_array, y_array, matrix = guan.read_two_dimensional_complex_data(filename='a', file_format='.txt') +# 读取文件中的二维数据(不包括x和y) +matrix = guan.read_two_dimensional_data_without_xy_array(filename='a', file_format='.txt') + # 打开文件用于新增内容 f = guan.open_file(filename='a', file_format='.txt') diff --git a/PyPI/setup.cfg b/PyPI/setup.cfg index 6c68a20..d21d761 100644 --- a/PyPI/setup.cfg +++ b/PyPI/setup.cfg @@ -1,7 +1,7 @@ [metadata] # replace with your username: name = guan -version = 0.0.165 +version = 0.0.166 author = guanjihuan author_email = guanjihuan@163.com description = An open source python package diff --git a/PyPI/src/guan.egg-info/PKG-INFO b/PyPI/src/guan.egg-info/PKG-INFO index 4311b7d..e5f007c 100644 --- a/PyPI/src/guan.egg-info/PKG-INFO +++ b/PyPI/src/guan.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: guan -Version: 0.0.165 +Version: 0.0.166 Summary: An open source python package Home-page: https://py.guanjihuan.com Author: guanjihuan diff --git a/PyPI/src/guan/__init__.py b/PyPI/src/guan/__init__.py index 3494763..7434a79 100644 --- a/PyPI/src/guan/__init__.py +++ b/PyPI/src/guan/__init__.py @@ -2,7 +2,7 @@ # With this package, you can calculate band structures, density of states, quantum transport and topological invariant of tight-binding models by invoking the functions you need. Other frequently used functions are also integrated in this package, such as file reading/writing, figure plotting, data processing. -# The current version is guan-0.0.165, updated on February 24, 2023. +# The current version is guan-0.0.166, updated on March 02, 2023. # Installation: pip install --upgrade guan @@ -2323,6 +2323,11 @@ def read_two_dimensional_complex_data(filename='a', file_format='.txt'): matrix = np.append(matrix, [matrix_row], axis=0) return x_array, y_array, matrix +# 读取文件中的二维数据(不包括x和y) +def read_two_dimensional_data_without_xy_array(filename='a', file_format='.txt'): + matrix = np.loadtxt(filename+file_format) + return matrix + # 打开文件用于新增内容 def open_file(filename='a', file_format='.txt'): try: