coin-or / coin-or/CyLP

Summing over axis

Open
#42 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JetBrains MPS
Stars
192
Forks
70
PR merge metrics
No merged PRs in 30d

Description

First off, thank you for a wonderful, wonderful tool. CyLP has saved me so much time already :+1:

I may well be doing things wrong, but I often find myself wishing I could write constraints like

``` python
s += my_binary_matrix.sum(axis = 1) == 1
```

but it appears that the variables' `sum()` function doesn't support it. Is there another way of expressing sums across a subset of dimensions (that doesn't require writing loops)?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.