Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 67 additions & 19 deletions docs/en/releases/unreleased.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 71 additions & 23 deletions docs/ja/releases/unreleased.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions markdowns/en/releases/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,26 @@ kernelspec:

+++

### Feature 1
### Generating arrays with a shape and generator function

+++
Starting with this version, the {py:func}`~jijmodeling.genarray` function can be used to generate arrays by specifying a shape and a generator function.
This is similar to {py:func}`~numpy.fromfunction` in NumPy.

```{code-cell} ipython3
import jijmodeling as jm


@jm.Problem.define("genarray example")
def problem(problem):
N = problem.Natural()
M = problem.Natural()
a = problem.Float(shape=(N, M))
x = problem.BinaryVar(shape=N)
Sums = problem.NamedExpr(jm.genarray(lambda i, j: a[i, j] * x[i], (N, M)))


problem
```

## Bugfixes

Expand Down
21 changes: 19 additions & 2 deletions markdowns/ja/releases/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,26 @@ kernelspec:

+++

### 機能1
### シェイプと生成関数による配列の生成

+++
本バージョンから、{py:func}`~jijmodeling.genarray` 関数により、シェイプと生成関数を指定して配列を生成できるようになりました。
これは numpy の {py:func}`~numpy.fromfunction` と類似の機能です。

```{code-cell} ipython3
import jijmodeling as jm


@jm.Problem.define("genarray example")
def problem(problem):
N = problem.Natural()
M = problem.Natural()
a = problem.Float(shape=(N, M))
x = problem.BinaryVar(shape=N)
Sums = problem.NamedExpr(jm.genarray(lambda i, j: a[i, j] * x[i], (N, M)))


problem
```

## バグ修正

Expand Down
Loading