本文整理汇总了TypeScript中@bokehjs/models/sources/column_data_source.patch_to_column函数的典型用法代码示例。如果您正苦于以下问题:TypeScript patch_to_column函数的具体用法?TypeScript patch_to_column怎么用?TypeScript patch_to_column使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了patch_to_column函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should handle patch indices with strides", () => {
const a = new Int32Array([1,2,3,4,5,6])
const b = new Int32Array([10, 20, -1, -2, 0, 10])
const c = new Int32Array([1,2])
patch_to_column([a, b, c], [
[[0, {step:1}, 2], [100, 101]],
], [[2,3], [3,2], [1,2]])
expect(a).to.be.instanceof(Int32Array)
expect(b).to.be.instanceof(Int32Array)
expect(c).to.be.instanceof(Int32Array)
expect(a).to.be.deep.equal(new Int32Array([1,2,100, 4,5,101]))
expect(b).to.be.deep.equal(new Int32Array([10, 20, -1, -2, 0, 10]))
expect(c).to.be.deep.equal(new Int32Array([1,2]))
patch_to_column([a, b, c], [
[[1, {start:0,stop:3,step:2}, {start:0,stop:1,step:1}], [100, 101]],
], [[2,3], [3,2], [1,2]])
expect(a).to.be.instanceof(Int32Array)
expect(b).to.be.instanceof(Int32Array)
expect(c).to.be.instanceof(Int32Array)
expect(c).to.be.deep.equal(new Int32Array([1,2]))
expect(a).to.be.deep.equal(new Int32Array([1,2,100, 4,5,101]))
expect(b).to.be.deep.equal(new Int32Array([100, 20, -1, -2, 101, 10]))
expect(c).to.be.deep.equal(new Int32Array([1,2]))
})