Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing isTypedArray when mixing versions of @tensorflow packages
A new function, `isTypedArray` was added to the `platform` interface by tensorflow#7181 and first published in tfjs-core 4.2.0. This made 4.2.0 incompatible with earlier versions of backends that implemented `platform`, such as node and react-native. This change adds a fallback to the use of `isTypedArray` so earlier versions of platforms that don't implement `isTypedArray` will not throw an error. Note that the fallback behavior may not be perfect, such as when running Jest tests in node. See tensorflow#7175 for more details and upgrade all @tensorflow scoped packages to ^4.2.0 to avoid this. Fixes tensorflow#7273
- Loading branch information