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 7917963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:20:25+00:00 2026-06-03T15:20:25+00:00

i designed a simple function to return a mathematical function which can be used

  • 0

i designed a simple function to return a mathematical function which can be used to fit experimental data to it. The functions looks pretty much like the following:

def colecole_2(f,*p):
    term1=p[0] * ( 1 - 1 / (1 + numpy.power((0+1j) * 2 * numpy.pi * f * p[1], p[2])))
    term2=p[3] * ( 1 - 1 / (1 + numpy.power((0+1j) * 2 * numpy.pi * f * p[4], p[5])))
    return p[6]*(1-abs( term1+ term2))

Unfortunately I run into troubles with RunTimeWarnings as:

RuntimeWarning: overflow encountered in power
RuntimeWarning: overflow encountered in divide

due to values that are too large or small. I am not able to figure this problem out on my own though. Is there any way to redefine my function so it will pass without warnings?

  • 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-03T15:20:28+00:00Added an answer on June 3, 2026 at 3:20 pm

    Use numpy.seterr to control what numpy does in this circumstance: http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html

    Use the warnings module to control how warnings are or are not presented: http://docs.python.org/library/warnings.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a simple designer which looks like visual studio. Specifically,
I have a simple view function that's designed to allow the user to choose
I have a simple function that's designed to copy a section of an xml
I designed a ASP.NET page named kk-container.aspx to be used as a control which
I just designed a simple For Loop using window form application. I would like
I am writing a simple unit test harness in powershell I designed the harness
So it appears with a simple designer change I can make the 3 tables
I designed an application which works in all browser except in IE, Actually where
I designed the data access portion of our framework so that every time a
I though it would be very simple but I can not get it today.

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.