Questions tagged [multiple-arguments]
53 questions
2
votes
1 answer
Apply a multi-argument function to a vector, varying only one argument
I would like to apply a function to a vector. My function takes multiple arguments, but I can keep the arguments the same throughout.
Here's what I've come up with, but it doesn't work. I've seen some things using mapply -- I'm not sure if that's…

Hatshepsut
- 5,962
- 8
- 44
- 80
2
votes
4 answers
Use multiple lists as input arguments of a function (Python)
I know that the property map(function,list) applies a function to each element of a single list. But how would it be if my function requires more than one list as input arguments?.
For example I tried:
def testing(a,b,c):
result1=a+b
…

Sarah
- 325
- 6
- 17
2
votes
2 answers
Return statement with more than one arguments
After compiling my C code with -Wall activated, the following warnings appeared
left operand of comma operator has no effect
which are related with the the multiple arguments presented in my return statements. The story is the following:
Assume to…

dimpep
- 63
- 1
- 6
2
votes
2 answers
Python/ Tkinter - Button to run function with multiple arguments not working
I am trying to write a program that will display 4 rows of 2 columns with column 0 being labels and column 1 being entries. Then, pass those 4 integer entries through as arguments into a function when a button is left clicked. Here is my code so…

Mark C
- 41
- 1
- 5
2
votes
1 answer
How to specify variable number of arguments using jni
I have a method in c that is:
static int callLuaFunctionWithParams(const char *functionName, int numParams, ...);
So it contains a variable number of arguments, and I want to export it so that it could be used on the android app.
On the…

nirvik
- 386
- 2
- 5
- 18
1
vote
1 answer
Problems using multiple arguments on google sheets using IFTEXT
I am trying to write a formula using IFTEXT on google sheets. What needs to happen is if there no text in the I column, then it will say "Not yet."
If there IS text in the I column but not the K column, it still needs to say "Not yet".
However, if…

morganmarie
- 11
- 1
1
vote
1 answer
Passing Multiple Arguments in a Batch FOR loop using Double Quotes?
I'm using a MediaInfo CLI in a batch script and I don't know what the issue is, but I cannot get this command to work if I use a folder path that has spaces in it. I'm not new to batch scripts and have created hundreds over the years. Normally I…

AppetiteForDestruction
- 174
- 1
- 9
1
vote
2 answers
Apply function to pandas series given varying arguments
Initial question
I want to calculate the Levenshtein distance between multiple strings, one in a series, the other in a list. I tried my hands on map, zip, etc., but I only got the desired result using a for loop and apply. Is there a way to improve…

Cappo
- 66
- 7
1
vote
1 answer
Plotting multiple variable function in R
I'm needing help with the following question:
Consider the following R function, named negloglike that has two input arguments: lam and x, in that order.
Use this function to produce a plot of the log-likelihood function over a range of values λ ∈…

ethy_32
- 11
- 4
1
vote
1 answer
Octave input arguments to function as cell array
I want to input arguments to an octave function as a cell array:
function x = myfunc(a_string, an_int)
printf("a string: %s\n", a_string);
printf("an int: %d\n", an_int);
end
myfunc("a", 1);
b = {"a", 1};
myfunc(b); % should do the same thing…

Evan Gunter
- 69
- 1
- 5
1
vote
1 answer
Python function to read JSON file and retrieve the correct value
I'm reading a JSON file to retrieve some values with my extract_json function and calling it by time_minutes_coords = extract_json("boxes", "time_minutes", "coord") which gives me the right path to my coord value.
def extract_json(one,two,three):
…

LucaP
- 638
- 1
- 12
- 34
1
vote
1 answer
Google Spreadsheets - IF with more that three arguments
I'm currently working an a very simple project management template.
The Idea is that after entering a start and end-date columns will show up as a very simplistic gantt chart (conditional formating).
Everything works fine, until "year" comes into…

Matthias
- 13
- 2
0
votes
1 answer
How to pass "in-tuple multiple arguments" without violating pep8?
I have a game class and I need to pass screen width and height into pygame.display.set_mode() in __init__ method.
It requires a tuple, for example - pygame.display.set_mode((width, height)).
I have also a second class named Settings from which I…

Local man
- 19
- 5
0
votes
1 answer
Python's argeparse using same option multiple times, but put those options in same list
In Python's argparse, using the same option multiple times puts those arguments in different lists. But I want those arguments on the same list.
The result I have got is:
# only the input portion
[
[input1, input2],
[input3, input4,…

Shezan
- 277
- 2
- 8
0
votes
2 answers
Passing multiple arguments to Python script using sys.argv[1] and numpy array. IndexError: list index out of range
I'm working in a small code to receive multiple arguments from an MQTT server and use them to predict another value. I'm showing a simplified code here just to get some help. To pass the arguments to the script for executing the prediction, first…

miinch
- 11
- 1
- 5