Open WPennock opened 2 years ago
Hi @WPennock! Apologies for the late response to your issue. What you're seeing is the result of a function with the utility.list_handler()
decorator above it (or, in the source code, @ut.list_handler()
). This decorator was added to many functions in the aguaclara
package to emulate NumPy functions that can either take in scalar inputs and produce scalar outputs or take in vector inputs and produce vector outputs (so giving a function a list of values is similar to calling the function on each value and storing the outputs in a list). When multiple inputs are lists, the result is a multidimensional array. There's a more thorough explanation in the documentation here.
The functionality isn't very well documented, and I don't blame you for being confused. What do you need to pass 8-element arrays into pc.re_pipe
for? What kind of output do you need?
I have been inputting 8-element long arrays for diameter and flow rate into
pc.re_pipe
. When I do this, I get an (8, 8, 1) matrix. If I then switch from a single value of kinematic viscosity to 8, I get an (8, 8, 8) matrix. I can't figure out what's going wrong, since when I write out the operation that is written in the code forpc.re_pipe
, I get a single (8,) array. This phenomenon throws off all dependent functions (e.g.,fric_pipe
).I will show the error here:
and this returns