Take a function where there is an “optional” parameter called weights. if weights is None, then assume equal weights for everything. However, I don’t think cuda.jit handles NoneType, and if weights is a 2D array of float32, I believe it will error if anything other than a 2D array of float32 is passed in as an argument.
One alternative is to initialize it to a small “dummy” array that is a 2D array of float32 and conduct a check to see if weights matches the prespecified dummy array. Does this seem sound? Any other thoughts for how to do this?