Allow decoders to decode Python types derived from primitives by lostmsu · Pull Request #1986 · pythonnet/pythonnet

What does this implement/fix? Explain your changes.

When a Python instance needs to be converted to System.Object, and the Python type is derived from one of the primitives (e.g. numpy.float64 is derived from float), allow a custom decoder to override the default behavior (which would have been converting to System.Double).

Does this close any currently open issues?

It addresses the primary concern of #1957

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change