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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:27:42+00:00 2026-06-04T22:27:42+00:00

I am trying to port from labview to python. In labview there is a

  • 0

I am trying to port from labview to python.

In labview there is a function “Integral x(t) VI” that takes a set of samples as input, performs a discrete integration of the samples and returns a list of values (the areas under the curve) according to Simpsons rule.

I tried to find an equivalent function in scipy, e.g. scipy.integrate.simps, but those functions return the summed integral across the set of samples, as a float.

How do I get the list of integrated values as opposed to the sum of the integrated values?

Am I just looking at the problem the wrong way around?

  • 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-04T22:27:45+00:00Added an answer on June 4, 2026 at 10:27 pm

    I think you may be using scipy.integrate.simps slightly incorrectly. The area returned by scipy.integrate.simps is the total area under y (the first parameter passed). The second parameter is optional, and are sample values for the x-axis (the actual x values for each of the y values). ie:

    >>> import numpy as np
    >>> import scipy
    >>> a=np.array([1,1,1,1,1])
    >>> scipy.integrate.simps(a)
    4.0
    >>> scipy.integrate.simps(a,np.array([0,10,20,30,40]))
    40.0
    

    I think you want to return the areas under the same curve between different limits? To do that you pass the part of the curve you want, like this:

    >>> a=np.array([0,1,1,1,1,10,10,10,10,0])
    >>> scipy.integrate.simps(a)
    44.916666666666671
    >>> scipy.integrate.simps(a[:5])
    3.6666666666666665
    >>> scipy.integrate.simps(a[5:])
    36.666666666666664
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a Labview program that takes input from a thermal
I'm trying to port a library from Java to .NET that makes heavy use
I am trying to port a project (from linux) that uses Semaphores to Mac
I'm trying to port an application from C# to Python. The application allows the
I am trying to port some C++ code from Windows to Solaris(Unix). There are
I have two select statements that I am trying to port from Oracle to
I am trying to port some code from MS-SQL to MySQL and there is
I'm trying to port an algorithm from Python to Go. The central part of
I'm trying to port python code from linux to windows right now. In various
I'm currently trying to port an app from asp.net to php, however I just

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.