-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GSProcessing] Fix isinstance check for numerical features (#955)
*Issue #, if available:* *Description of changes:* * Fixes corner case where a feature value might not be one of int/float (we don't cast Parquet input types), replacing with the more general `numbers.Number`. Example of how to trigger a failure, as observed by a customer: ```python >>> import numbers >>> import decimal >>> dn = decimal.Decimal(5) >>> intnum = 5 >>> isinstance(intnum, (float, int)) True >>> isinstance(dn, (float, int)) False >>> isinstance(dn, numbers.Number) True ``` By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
Showing
1 changed file
with
74 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters