dup

WebJar for dup

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

dup
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

dup
WebJar for dup
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/scijs/dup

Скачать dup

Имя Файла Размер
dup-1.0.0.pom
dup-1.0.0.jar 5 KB
dup-1.0.0-sources.jar 22 bytes
dup-1.0.0-javadoc.jar 22 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/dup/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>dup</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/dup/
implementation 'org.webjars.npm:dup:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/dup/
implementation ("org.webjars.npm:dup:1.0.0")
'org.webjars.npm:dup:jar:1.0.0'
<dependency org="org.webjars.npm" name="dup" rev="1.0.0">
  <artifact name="dup" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='dup', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "dup" % "1.0.0"
[org.webjars.npm/dup "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

dup

Initializes an n-dimensional array to a constant value.

Install

npm install dup

Example

var dup = require("dup")

console.log(dup(5))

//Prints:
//
//    [0, 0, 0, 0, 0]
//


console.log(dup([3,2], 1))

//Prints:
//
//    [[1, 1],
//     [1, 1],
//     [1, 1]]
//

require("dup")(shape[, value])

Initializes an array to a constant value

  • shape Either an array of dimensions or a scalar, representing the shape of the array to create.
  • value The value to initialize the array with. Default is 0

Returns An n-dimensional array with the given shape and value

Rationale

I often find myself using numeric.js' rep method in my projects. However, for many things pulling in all of numeric.js is total overkill, especially for code that ultimately needs to run on the browser. So I decided to make this library which just implements the rep and nothing else in the spirit of promoting modularity by smaller and more numerous packages.

Credits

(c) 2013 Mikola Lysenko. MIT License

org.webjars.npm

Версии библиотеки

Версия
1.0.0