Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7902975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:38:32+00:00 2026-06-03T09:38:32+00:00

I am getting an error that I don’t quite understand with the following script.

  • 0

I am getting an error that I don’t quite understand with the following script. I thought I would be able to multiple the two numpy arrays happliy but I keep getting this error:

TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'numpy.ndarray'

The script is below:

def currents_to_resistance(Istack1, Istack2, A_list, x_list):

    #Error Calcs
    Videal_R1 = (1.380648e-23 * (27+273.15)) / (1.6021766e-19)
    print Videal_R1
    Istack1 = np.array(Istack1)
    Istack2 = np.array(Istack2)
    print Istack1
    print Istack2   

    g = Istack1*Istack2
    print g 

The print Istack1 Istack2 before the multiply come out as

['0.0005789047' '0.0005743839' '0.0005699334' '0.000565551' '0.0005612346'
 '0.0005569839' '0.0005527969' '0.0005486719' '0.000544608' '0.0005406044'
 '0.0005366572' '0.000532768' '0.000528934' '0.0005251549' '0.0005214295'
 '0.0005177562' '0.0005141338' '0.0005105614' '0.000507039' '0.0005035643'
 '0.0005001368' '0.0004967555' '0.0004934193' '0.0004901279' '0.0004868796'
 '0.0004836736']
['0.000608027' '0.0006080265' '0.0006080267' '0.0006080267' '0.0006080261'
 '0.0006080261' '0.0006080262' '0.0006080261' '0.0006080263' '0.0006080272'
 '0.0006080262' '0.0006080262' '0.0006080257' '0.0006080256' '0.0006080258'
 '0.0006080256' '0.0006080252' '0.0006080247' '0.000608025' '0.0006080249'
 '0.000608025' '0.0006080251' '0.0006080249' '0.0006080254' '0.0006080251'
 '0.0006080247']

I call the function using

Re_list = currents_to_resistance(full_list[i][0],full_list[i][1], temp_A, temp_x)

What am I missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:38:33+00:00Added an answer on June 3, 2026 at 9:38 am

    convert string array to float array first:

    Istack1 = np.array(Istack1, np.float)
    Istack2 = np.array(Istack2, np.float)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're getting this error once a day on a script that runs every two
I'm getting an error with FlexUnit 4 that I am not able to find
I'm getting a syntax error that I don't seem to find an answer to
I'm getting this error that's driving me up the wall. I don't see what's
What are the most common reasons that I would be getting this error from
I'm getting an error in MapView that I don't recognize and can't find documentation
I am getting an error that says: error: looser throw specifier for 'virtual CPLAT::CP_Window::~CP_Window()'
I am trying to access a stored procedure and I'm getting an error that
Im getting this linker error that won't let me compile. It only happens on
I'm getting the NRE error that says: Object reference not set to an instance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.