Skip to content

Conversation

@moe-ad
Copy link
Contributor

@moe-ad moe-ad commented Sep 24, 2025

Close #2546.

Before the fix:

Original DPF  Field
  Location: Nodal
  Unit: mm
  3 entities 
  Data: 3 components and 3 elementary data 

  IDs                   data(mm)
  ------------          ----------
  1                     1.000000e+00   2.000000e+00   3.000000e+00   
  2                     4.000000e+00   5.000000e+00   6.000000e+00   
  3                     7.000000e+00   8.000000e+00   9.000000e+00   

Transposed view DPF  Field
  Location: Nodal
  Unit: 
  3 entities 
  Data: 3 components and 3 elementary data 

  IDs                   data
  ------------          ----------
  1                     1.000000e+00   2.000000e+00   3.000000e+00   
  2                     4.000000e+00   5.000000e+00   6.000000e+00   
  3                     7.000000e+00   8.000000e+00   9.000000e+00   

Transposed copy DPF  Field
  Location: Nodal
  Unit: mm
  3 entities
  Data: 3 components and 3 elementary data

  IDs                   data(mm)
  ------------          ----------
  1                     1.000000e+00   4.000000e+00   7.000000e+00
  2                     2.000000e+00   5.000000e+00   8.000000e+00
  3                     3.000000e+00   6.000000e+00   9.000000e+00

After the fix:

Original DPF  Field
  Location: Nodal
  Unit: mm
  3 entities 
  Data: 3 components and 3 elementary data 

  IDs                   data(mm)
  ------------          ----------
  1                     1.000000e+00   2.000000e+00   3.000000e+00   
  2                     4.000000e+00   5.000000e+00   6.000000e+00   
  3                     7.000000e+00   8.000000e+00   9.000000e+00   

Transposed view DPF  Field
  Location: Nodal
  Unit: 
  3 entities 
  Data: 3 components and 3 elementary data 

  IDs                   data
  ------------          ----------
  1                     1.000000e+00   4.000000e+00   7.000000e+00
  2                     2.000000e+00   5.000000e+00   8.000000e+00
  3                     3.000000e+00   6.000000e+00   9.000000e+00

Transposed copy DPF  Field
  Location: Nodal
  Unit: mm
  3 entities
  Data: 3 components and 3 elementary data

  IDs                   data(mm)
  ------------          ----------
  1                     1.000000e+00   4.000000e+00   7.000000e+00
  2                     2.000000e+00   5.000000e+00   8.000000e+00
  3                     3.000000e+00   6.000000e+00   9.000000e+00

@moe-ad moe-ad self-assigned this Sep 24, 2025
@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.09%. Comparing base (c52ee15) to head (ce25d4d).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2630   +/-   ##
=======================================
  Coverage   84.09%   84.09%           
=======================================
  Files          91       91           
  Lines       10706    10708    +2     
=======================================
+ Hits         9003     9005    +2     
  Misses       1703     1703           

@moe-ad moe-ad requested a review from PProfizi September 24, 2025 10:57
@PProfizi
Copy link
Contributor

@moe-ad you can directly make a test out of the script in the issue.

@github-actions
Copy link
Contributor

Some tests with 'continue-on-error: true' have failed:

  • PyDPF-Post API tests on ubuntu-latest

Created by continue-on-error-comment

@moe-ad moe-ad requested a review from PProfizi September 25, 2025 08:53
@PProfizi PProfizi changed the title fix: bug related to array views fix: support NumPy array views to set data of Field Sep 25, 2025
@moe-ad moe-ad merged commit 351b232 into main Sep 25, 2025
46 checks passed
@moe-ad moe-ad deleted the fix/array-view-bug branch September 25, 2025 13:37
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.

Cannot assign data with array view

3 participants