Comments (3)
I was surprised we had a warning for the Laurent cases. For the Polynomial case I'd suggest the warning is warranted, as the default is an unexpected ignoring of the offset. Let me adjust the Laurent case.
from polynomials.jl.
Thanks for the comment. At one time Polynomial(::OffsetVector)
created a LaurentPolynomial
but that was removed. Now you would use that constructor directly:
julia> LaurentPolynomial(c)
┌ Warning: Using the axis offset of the coefficient vector ...
LaurentPolynomial(1.0 + 2.0*x + 3.0*x²)
This allows for other value dependent offsets:
julia> c = OffsetArray([1,2,3], -1:1);
julia> LaurentPolynomial(c)
┌ Warning: Using the axis offset of the coefficient vector...
LaurentPolynomial(x⁻¹ + 2 + 3*x)
For this c
, Polynomial(c)
would be incorrect.
The LaurentPolynomial
usage should be identical to that of a Polynomial
, though a shade less performant, should that matter.
from polynomials.jl.
Wouldn't documentation be strongly preferable to warnings?
from polynomials.jl.
Related Issues (20)
- docs: advertise composition of polynomials HOT 1
- `ImmutablePolynomial` constructors seem to prevent good type inference HOT 4
- improved implementations of composition of polynomials HOT 4
- bad type inference for composition of `ImmutablePolynomial`s HOT 2
- Should `AbstractPolynomial` subtype `Function`? HOT 2
- Question: is multipliciation of polynomials implemented with FFT HOT 6
- type stability: `(::Polynomial)(::ImmutablePolynomial)` composition yields `ImmutablePolynomial` HOT 2
- polynomials should have `big` methods? HOT 2
- Should `coeffs(::ImmutablePolynomial)` be type-stable? HOT 1
- Feature request: decompose a polynomial HOT 1
- Polynomials.fit fails with InexactError for Rational HOT 2
- Question about using HOT 2
- Warnings and Test failure with Julia 1.10 HOT 2
- Polynomial/Polynomial = Rational or? HOT 1
- Conversions to and from RationalFunction broken HOT 3
- MakieCore doesn't need to be in `deps` HOT 12
- Issues with differentiating with respect to polynomial coefficients
- Polynomials.fit changes behavior somewhere between (inclusive) Julia 1.7.3 and Julia 1.10.4, the latter being self-inconsistent (problematic)
- Polynomials requiring MakieCore HOT 5
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 polynomials.jl.