- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs
Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
14 lines
365 B
JavaScript
14 lines
365 B
JavaScript
var isTypedArray = require('./is-typed-array')
|
|
|
|
module.exports = function isNDArrayLike (obj) {
|
|
return (
|
|
!!obj &&
|
|
typeof obj === 'object' &&
|
|
Array.isArray(obj.shape) &&
|
|
Array.isArray(obj.stride) &&
|
|
typeof obj.offset === 'number' &&
|
|
obj.shape.length === obj.stride.length &&
|
|
(Array.isArray(obj.data) ||
|
|
isTypedArray(obj.data)))
|
|
}
|