Skip to content

Commit b6f9347

Browse files
committed
Fix: Flatten capture length arrays before passing to MHKiT-Python
1 parent a334ade commit b6f9347

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mhkit/wave/performance/capture_length.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020

2121

2222

23-
Power = py.numpy.array(Power);
24-
J = py.numpy.array(J);
23+
% Flatten arrays to 1D to handle both row and column vectors
24+
Power = py.numpy.array(Power).flatten();
25+
J = py.numpy.array(J).flatten();
2526

2627
L = py.mhkit.wave.performance.capture_length(Power, J);
2728

0 commit comments

Comments
 (0)