It’s basically saying that it didn’t like the function arguments you gave it (the Boost.Python wrapper reports any argument conversion issues like this).
Specifically you passed a
numpy.int32 value to the
reconstruction_time argument of partition_into_plates.
We’ve added support for NumPy scalar types (like
numpy.int32) in recent internal versions of pyGPlates but the latest public release (August 2020) does not support it.
So until the next public release, a workaround is to wrap your NumPy integer with
float() so that you pass, for example,
float(numpy_time) instead of just
partition_into_plates(..., reconstruction_time=float(numpy_time), ...)
The technical details of why you’re getting that error message are…
When you call
partition_into_plates(), internally it creates a PlatePartitioner object (this is what the
PlatePartitioner.__init__ in your error message means). The first
__init__ (between the red lines) is saying that you passed in a FeatureCollection, a RotationModel, a
numpy.int32 and a
SortPartitioningPlates. Then it shows another two
__init__, which are the two alternatives it accepts. These two alternatives are documented at PlatePartitioner where you can see that one of those two
__init__ overloads accepts a
reconstruction_time argument that can either be a
float or a GeoTimeInstant. It’s here that it’s having trouble converting the
numpy.int32 that you passed into a
GeoTimeInstant. And it’s why explicitly converting to
float, as mentioned above, is required for the current public release of pyGPlates. However the next public release will have builtin conversions from NumPy scalars to
float such that they’re essentially equivalent types as far as pyGPlates is concerned, and this explicit conversion will no longer be required.