Skip to content

Fix load_table #1402

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

Merged
merged 3 commits into from
Aug 25, 2022
Merged

Fix load_table #1402

merged 3 commits into from
Aug 25, 2022

Conversation

akaszynski
Copy link
Collaborator

Resolve #1355 by patching the way we read tables using TREAD.

Prior to this patch we were completely skipping the first row as @CesarRodriguezPereira pointed out. Thanks for posting the issue so we can fix this.

Now MAPDL behaves exactly as we document it in our examples:

>>> my_conv = np.array([[0, 0.001],
                        [120, 0.001],
                        [130, 0.005],
                        [700, 0.005],
                        [710, 0.002],
                        [1000, 0.002]])
>>> mapdl.load_table('MY_TABLE', my_conv, 'TIME')
>>> mapdl.parameters['MY_TABLE']
array([[0.001],
       [0.001],
       [0.005],
       [0.005],
       [0.002],
       [0.002]])

@github-actions
Copy link
Contributor

Please add one of the following labels to add this contribution to the Release Notes 👇

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #1402 (2dcc4a3) into main (5c8a325) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1402      +/-   ##
==========================================
+ Coverage   76.72%   76.76%   +0.03%     
==========================================
  Files          43       43              
  Lines        6880     6878       -2     
==========================================
+ Hits         5279     5280       +1     
+ Misses       1601     1598       -3     

@akaszynski akaszynski merged commit 3a65caf into main Aug 25, 2022
@akaszynski akaszynski deleted the fix/load_table branch August 25, 2022 13:48
germa89 pushed a commit that referenced this pull request Sep 1, 2022
* fix load table

* cleanup docstring

* cleanup docstring again
germa89 added a commit that referenced this pull request Sep 1, 2022
germa89 pushed a commit that referenced this pull request Sep 1, 2022
* fix load table

* cleanup docstring

* cleanup docstring again
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

Successfully merging this pull request may close these issues.

Load_table() has problems with first row and first value being negative
1 participant