Expected 2 Arugments in Input Array

20 views
Skip to first unread message

Andrew Dorsey

unread,
Aug 16, 2022, 9:22:19 PM8/16/22
to SUAVE FORUM
Hey All!

I'm working on a personal heavily modified branch that's been branched since 2018 so I realize I may have a unique issue but seeing if others have ran into it.

I recently switched to a new computer, pulled my branch over and installed SUAVE. I ran into a few issues with the new Python (the collectibles.abc one I figured out), but am now running into an issue where my code doesn't work that worked before.

Specifically, In my Optimize.py, I am getting the error on problem.inputs = np.arry([
TypeError: getattr expected at least 2 arguments, got 1.

I do see some of the tutorials include a dtype = object as a second argument, which I tried with no luck. 

Any chance anyone else has seen this?

Andrew

Emilio

unread,
Aug 16, 2022, 10:14:17 PM8/16/22
to SUAVE FORUM
Hi Andrew,
Since 2018 numpy has changed how they handle objects (as you've figured out). Now the units need to be multiplied by 1. This will turn the units function into a number.

-Emilio

Andrew Dorsey

unread,
Aug 16, 2022, 10:56:40 PM8/16/22
to SUAVE FORUM
Thanks Emilio as always! Only took me 3 years to realize it. 
Reply all
Reply to author
Forward
0 new messages