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

crtfld的varTypes不能使用List只能使用array #392

Open
whkrain opened this issue Dec 9, 2024 · 0 comments
Open

crtfld的varTypes不能使用List只能使用array #392

whkrain opened this issue Dec 9, 2024 · 0 comments

Comments

@whkrain
Copy link

whkrain commented Dec 9, 2024

Bug描述
crtfld的varTypes不能使用List只能使用array,与文档描述不符.
版本2.7.0

复现方式

xlimit = [-1.5, 4]
ylimit = [-3, 4]
xborders = [1, 1]
yborders = [1, 1]

ranges = np.vstack([xlimit, ylimit]).T
borders = np.vstack([xborders, yborders]).T

#types = np.array([0,0])
types = [0,0]

encoding = 'BG'
codes = [1, 1]
precisions = [6, 6]
scales = [0, 0]

FieldD = ea.crtfld(
    encoding,
    types,
    ranges,
    borders,
    precisions,
    codes,
    scales,
)
print(FieldD)

期望输出

[[23.  23. ]
 [-1.5 -3. ]
 [ 4.   4. ]
 [ 1.   1. ]
 [ 0.   0. ]
 [ 1.   1. ]
 [ 1.   1. ]
 [ 0.   0. ]]

实际输出

[[ 0.   0. ]
 [-1.5 -3. ]
 [ 4.   4. ]
 [ 1.   1. ]
 [ 0.   0. ]
 [ 1.   1. ]
 [ 1.   1. ]
 [ 1.   1. ]]
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

No branches or pull requests

1 participant