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

  • Home
  • SEARCH
  • 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 7432009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:23:12+00:00 2026-05-29T09:23:12+00:00

My code is available here because Stack Overflow kept giving me errors when I

  • 0

My code is available here because Stack Overflow kept giving me errors when I tried to post it here.

My error is below:

Traceback (most recent call last):
  File "/tmp/DoubleIntegrate.py", line 30, in <module>
    t = interpolate.UnivariateSpline(d1.values(), d2.values())
  File "/Library/Python/2.7/site-packages/scipy-0.11.0.dev_1983db6_20120208-py2.7-macosx-10.7-x86_64.egg/scipy/interpolate/fitpack2.py", line 136, in __init__
    xb=bbox[0],xe=bbox[1],s=s)
dfitpack.error: (m>k) failed for hidden m: fpcurf0:m=1

I combed through the source code and wasn’t able to make heads from tail out of it.

What does this error mean?

  • 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-05-29T09:23:14+00:00Added an answer on May 29, 2026 at 9:23 am

    There are a few things which I think could cause problems.

    1. d1 = d2 = {}

      This doesn’t make two separate dictionaries; it makes one, and the two names d1 and d2 both point at it. This should be d1 = {} and d2 = {}.

    2. These lines blow the dictionaries away in each loop iteration:

          d1 = {part[0] : xval}
          d2 = {part[0] : yval}
      

      In order to add to the dictionaries, these should be:

          d1[part[0]] = xval
          d2[part[0]] = yval
      

      and you should probably convert the keys to floats as well, to make sure we can order them correctly.

    3. Finally, dictionaries don’t have an order, so the line

      t = interpolate.UnivariateSpline(d1.values(), d2.values())
      

      is dangerous because you have no guarantee that they’re going to be in the same order, or the right order. If you want to spline the xvals against the yvals, you want something like

      keys = sorted(d1)
      xs = [d1[k] for k in keys]
      ys = [d2[k] for k in keys]
      t = interpolate.UnivariateSpline(xs, ys)
      

      but I’d probably simply accumulate a list of xs and ys instead of using the dictionaries.

    The particular error message you’re seeing is basically saying there aren’t enough data points to match the number of knots, which makes sense because it was only getting one data point due to bug #2.

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

Sidebar

Related Questions

Is the source code available somewhere just to make a few small fixes to
Is there any (hopefully free/open source) code available that does native TLS/SSL communication? I
I'm especially interested in solutions with source code available (Django independency is a plus,
I had heard a rumour that the ActiveDirectoryMembershipProvider source code was available. I'm having
Is there any code coverage tool available for PHP? I wish to check the
Are there any winforms source code editor controls available with color coding ? pref.
This code works fine to find an available room within certain date, but it
Which parsers are available for parsing C# code? I'm looking for a C# parser
Is there a freely available Base64 decoding code snippet in C++?
I have some code which I am making available via RMI. If my program

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.