0.0.166
This commit is contained in:
parent
88b3564344
commit
4a53868d57
@ -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_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')
|
f = guan.open_file(filename='a', file_format='.txt')
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
# replace with your username:
|
# replace with your username:
|
||||||
name = guan
|
name = guan
|
||||||
version = 0.0.165
|
version = 0.0.166
|
||||||
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
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: guan
|
Name: guan
|
||||||
Version: 0.0.165
|
Version: 0.0.166
|
||||||
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
|
||||||
|
@ -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.
|
# 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
|
# 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)
|
matrix = np.append(matrix, [matrix_row], axis=0)
|
||||||
return x_array, y_array, matrix
|
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'):
|
def open_file(filename='a', file_format='.txt'):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user