Kindly log in to use this feature. We’ll take you to the login page automatically.
LoginGeneral Tech Bugs & Fixes 3 years ago
User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.
No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Kindly log in to use this feature. We’ll take you to the login page automatically.
LoginReady to take your education and career to the next level? Register today and join our growing community of learners and professionals.
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
Your experience on this site will be improved by allowing cookies. Read Cookie Policy
manpreet
Best Answer
3 years ago
I am new to python programming and I am trying to write a code in python that calculates the resistance and the power of a planning craft. I have to calculate some variables that are needed for the resistance and the power for the ship with a full load as well as empty. I got the right results for some values (up to lambda0 and lambda2, I check the results from python with hand calculations). But I get wrong values for trim angle calculation (tau1, tau2). For the tau calculation, I used a function that has three variable (C_l0, lambda0, Cv_si), an all variables are in a form of an array(37,)(1,)(37,) respectively. I double check the tau equation and the formula is written correctly, I think that the problem might occur from the arrays. Also, when I use the results from t_rad to the velocity formula (Vb_1) I get the following error (TypeError: only size-1 arrays can be converted to Python scalars) then I tried to pick just the first value from the t_rad array using [:1], but I'm not sure if this is correct. There is any other way which can I use the obtained t_rad without choosing only the first value of the array (and without getting the error)?