Thank you for your reply, that works now. I’m still new to C++ and I realise now that ExpandingArray is a template. Is it possible to use it for parameter types? or would I have to either:
Convert the ints to tuples in python
or
Write separate functions in C++ for int options vs. tuple options?
If you would like to pass integers directly, you could use the int64_t type in C++, as you’ve already done with the groups parameter.
Could you explain the use case a bit, if I misunderstood it?
Of course sorry. To clarify I was hoping that by specifying the optional parameters as ExpandingArray, then the function would accept either tuples, or integers that would then be expanded to tuples. So I could either pass (1,1) or simply 1 for my stride and see the same behaviour.
Again I’m still learning c++ and it seems now incorrect.
Thank you again for your help!
Ah OK, thanks for the explanation.
I’m not sure what the proper way would be, but I’ve seen the usage of c10::ArrayRef<long int> in C++ and passing a tuple with different number of elements on the Python side via: