Comments (6)
I'm guessing your function spits out the wrong data shape. Can you provide a minimal example?
from quadpy.
It is literally the line_segment example in the readme file.
val = qp.line_segment.integrate(lambda x: np.exp(x), [0.0, 1.0], qp.line_segment.GaussPatterson(5))
from quadpy.
Cannot reproduce. This
import quadpy
import numpy as np
val = quadpy.line_segment.integrate(
lambda x: np.exp(x),
[0.0, 1.0],
quadpy.line_segment.GaussPatterson(5)
)
print(val)
gives
1.7182818284588917
on my machine. (The exact value is exp(1) - exp(0)
which is approximately 1.718281828459045
, so this is correct.)
from quadpy.
I see. This is the error that I am getting.
from quadpy.
Looks very much like an error in your numpy installation.
from quadpy.
Edit: Tried it again after restarting ipython. And it worked this time. Got the same answer as you. Possibly some numpy issue. Thanks for looking in to it.
from quadpy.
Related Issues (20)
- ValueError: Need x21 < 0.3 (also why is the code encrypted?) HOT 8
- Problem with vectorization HOT 6
- Quadpy usage HOT 1
- The source code is not available HOT 1
- Status of package and licensing HOT 4
- Quadpy is now asking for a sigma license HOT 18
- Can't import HOT 8
- Orthopy version no longer supported HOT 9
- version of orthopy no longer supported HOT 5
- Return points and values for integrate_adaptive HOT 1
- Importing quadpy causes python to quit without any error message HOT 4
- Issue upgrading quadpy HOT 7
- Unable to find valid license for Sigma. HOT 3
- Recurrent issue with sigma license HOT 5
- NameError: name 'c2' is not defined HOT 3
- Quadpy RuntimeError HOT 7
- Adaptive multivariate integration over hypercubes HOT 9
- Integrate over multiple limits at once using Quadpy HOT 8
- newest pip version not importable HOT 1
- the integrals with Heaviside function are very inaccurate HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quadpy.