Polyval for multiple variableCalling a function of a module by using its name (a string)Replacements for switch statement in Python?How do you split a list into evenly sized chunks?How do I return multiple values from a function?Using global variables in a functionHow do I pass a variable by reference?Use of *args and **kwargsCatch multiple exceptions in one line (except block)How to test multiple variables against a value?Why is “1000000000000000 in range(1000000000000001)” so fast in Python 3?
(3 of 11: Akari) What is Pyramid Cult's Favorite Car?
Can I change the license of a forked project to the MIT if the license of the parent project has changed from the GPL to the MIT?
Finding the Maximum of a Continuous Function over a Closed Interval
What's the importance of the plane hijacking to the plot of Suspiria (2018)?
If Trump gets impeached, how long would Pence be president?
Could the rotation of a black hole cause other planets to rotate?
How do I learn to recognise what is worth publishing
What do I do with a party that is much stronger than their level?
How to access HTML input values from Twig and vice versa
Japanese reading of an integer
Anti-cheating: should there be a limit to a number of toilet breaks per game per player?
Exploiting the delay when a festival ticket is scanned
Why would anyone ever invest in a cash-only etf?
Why radial coordinate of a particle must decrease continuously once it is inside the Schwarzschild radius?
Is there a wealth gap in Boston where the median net worth of white households is $247,500 while the median net worth for black families was $8?
Why did Windows 95 crash the whole system but newer Windows only crashed programs?
Struggling with cyclical dependancies in unit tests
Compound Word Neologism
Can an Oathbreaker Paladin reform and choose a different Paladin subclass?
Examples of simultaneous independent breakthroughs
Assuring luggage isn't lost with short layover
Is it error of law to judge on less relevant case law when there is much more relevant one?
Summoning A Technology Based Demon
List of visa access for each country
Polyval for multiple variable
Calling a function of a module by using its name (a string)Replacements for switch statement in Python?How do you split a list into evenly sized chunks?How do I return multiple values from a function?Using global variables in a functionHow do I pass a variable by reference?Use of *args and **kwargsCatch multiple exceptions in one line (except block)How to test multiple variables against a value?Why is “1000000000000000 in range(1000000000000001)” so fast in Python 3?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm looking for a function to calculate the value of a polynomial with multiple variables. For 2d polynomials, I use numpy.polyval, I have values of coefficients as a list and value for x.
I wonder if there is a similar function for x, y, z space so that my input was values of coefficients and value for x, y.
python numpy
add a comment |
I'm looking for a function to calculate the value of a polynomial with multiple variables. For 2d polynomials, I use numpy.polyval, I have values of coefficients as a list and value for x.
I wonder if there is a similar function for x, y, z space so that my input was values of coefficients and value for x, y.
python numpy
add a comment |
I'm looking for a function to calculate the value of a polynomial with multiple variables. For 2d polynomials, I use numpy.polyval, I have values of coefficients as a list and value for x.
I wonder if there is a similar function for x, y, z space so that my input was values of coefficients and value for x, y.
python numpy
I'm looking for a function to calculate the value of a polynomial with multiple variables. For 2d polynomials, I use numpy.polyval, I have values of coefficients as a list and value for x.
I wonder if there is a similar function for x, y, z space so that my input was values of coefficients and value for x, y.
python numpy
python numpy
asked Mar 26 at 19:37
MarkAlanFrankMarkAlanFrank
3891 silver badge9 bronze badges
3891 silver badge9 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Are you looking for this?
link
Evaluate a 2-D polynomial at points (x, y).
This function returns the value
p(x,y) = sum_i,j c_i,j * x^i * y^j
The parameters x and y are converted to arrays only if they are tuples
or a lists, otherwise they are treated as a scalars and they must have
the same shape after conversion. In either case, either x and y or
their elements must support multiplication and addition both with
themselves and with the elements of c.
If c has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:]
+ x.shape.
Parameters:
x, y : array_like, compatible objects
The two dimensional series is evaluated at the points (x, y), where x
and y must have the same shape. If x or y is a list or tuple, it is
first converted to an ndarray, otherwise it is left unchanged and, if
it isn’t an ndarray, it is treated as a scalar.
c : array_like
Array of coefficients ordered so that the coefficient of the term of
multi-degree i,j is contained in c[i,j]. If c has dimension greater
than two the remaining indices enumerate multiple sets of
coefficients.
Returns:
values : ndarray, compatible object The values of the two dimensional
polynomial at points formed with pairs of corresponding values from x
and y.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365055%2fpolyval-for-multiple-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are you looking for this?
link
Evaluate a 2-D polynomial at points (x, y).
This function returns the value
p(x,y) = sum_i,j c_i,j * x^i * y^j
The parameters x and y are converted to arrays only if they are tuples
or a lists, otherwise they are treated as a scalars and they must have
the same shape after conversion. In either case, either x and y or
their elements must support multiplication and addition both with
themselves and with the elements of c.
If c has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:]
+ x.shape.
Parameters:
x, y : array_like, compatible objects
The two dimensional series is evaluated at the points (x, y), where x
and y must have the same shape. If x or y is a list or tuple, it is
first converted to an ndarray, otherwise it is left unchanged and, if
it isn’t an ndarray, it is treated as a scalar.
c : array_like
Array of coefficients ordered so that the coefficient of the term of
multi-degree i,j is contained in c[i,j]. If c has dimension greater
than two the remaining indices enumerate multiple sets of
coefficients.
Returns:
values : ndarray, compatible object The values of the two dimensional
polynomial at points formed with pairs of corresponding values from x
and y.
add a comment |
Are you looking for this?
link
Evaluate a 2-D polynomial at points (x, y).
This function returns the value
p(x,y) = sum_i,j c_i,j * x^i * y^j
The parameters x and y are converted to arrays only if they are tuples
or a lists, otherwise they are treated as a scalars and they must have
the same shape after conversion. In either case, either x and y or
their elements must support multiplication and addition both with
themselves and with the elements of c.
If c has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:]
+ x.shape.
Parameters:
x, y : array_like, compatible objects
The two dimensional series is evaluated at the points (x, y), where x
and y must have the same shape. If x or y is a list or tuple, it is
first converted to an ndarray, otherwise it is left unchanged and, if
it isn’t an ndarray, it is treated as a scalar.
c : array_like
Array of coefficients ordered so that the coefficient of the term of
multi-degree i,j is contained in c[i,j]. If c has dimension greater
than two the remaining indices enumerate multiple sets of
coefficients.
Returns:
values : ndarray, compatible object The values of the two dimensional
polynomial at points formed with pairs of corresponding values from x
and y.
add a comment |
Are you looking for this?
link
Evaluate a 2-D polynomial at points (x, y).
This function returns the value
p(x,y) = sum_i,j c_i,j * x^i * y^j
The parameters x and y are converted to arrays only if they are tuples
or a lists, otherwise they are treated as a scalars and they must have
the same shape after conversion. In either case, either x and y or
their elements must support multiplication and addition both with
themselves and with the elements of c.
If c has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:]
+ x.shape.
Parameters:
x, y : array_like, compatible objects
The two dimensional series is evaluated at the points (x, y), where x
and y must have the same shape. If x or y is a list or tuple, it is
first converted to an ndarray, otherwise it is left unchanged and, if
it isn’t an ndarray, it is treated as a scalar.
c : array_like
Array of coefficients ordered so that the coefficient of the term of
multi-degree i,j is contained in c[i,j]. If c has dimension greater
than two the remaining indices enumerate multiple sets of
coefficients.
Returns:
values : ndarray, compatible object The values of the two dimensional
polynomial at points formed with pairs of corresponding values from x
and y.
Are you looking for this?
link
Evaluate a 2-D polynomial at points (x, y).
This function returns the value
p(x,y) = sum_i,j c_i,j * x^i * y^j
The parameters x and y are converted to arrays only if they are tuples
or a lists, otherwise they are treated as a scalars and they must have
the same shape after conversion. In either case, either x and y or
their elements must support multiplication and addition both with
themselves and with the elements of c.
If c has fewer than two dimensions, ones are implicitly appended to
its shape to make it 2-D. The shape of the result will be c.shape[2:]
+ x.shape.
Parameters:
x, y : array_like, compatible objects
The two dimensional series is evaluated at the points (x, y), where x
and y must have the same shape. If x or y is a list or tuple, it is
first converted to an ndarray, otherwise it is left unchanged and, if
it isn’t an ndarray, it is treated as a scalar.
c : array_like
Array of coefficients ordered so that the coefficient of the term of
multi-degree i,j is contained in c[i,j]. If c has dimension greater
than two the remaining indices enumerate multiple sets of
coefficients.
Returns:
values : ndarray, compatible object The values of the two dimensional
polynomial at points formed with pairs of corresponding values from x
and y.
answered Mar 26 at 19:50
IstvanIstvan
3,3906 gold badges32 silver badges66 bronze badges
3,3906 gold badges32 silver badges66 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365055%2fpolyval-for-multiple-variable%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown