Questions tagged [comb]
3 questions
9
votes
3 answers
Why does multiple use of `<( )>` token within `comb` not behave as expected?
I want to extract the row key(here is 28_2820201112122420516_000000), the column name(here is bcp_startSoc), and the value(here is 64.0) in $str, where $str is a row from HBase:
# `match` is OK
my $str = '28_2820201112122420516_000000…

chenyf
- 5,048
- 1
- 12
- 35
4
votes
1 answer
python AttributeError: module 'math' has no attribute 'comb'
I'm getting an error when I try to use the 'comb' function:
$ python
Python 3.7.1 (default, Dec 14 2018, 13:28:58)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more…

Krischu
- 1,024
- 2
- 15
- 35
2
votes
1 answer
Why is there a difference between scipy.special.comb and math.comb?
Can someone explain why this is not equal please?
import scipy
import math
sum(math.comb(250, i) for i in range(0, 251)) == sum(scipy.special.comb(250, i) for i in range(0, 251))
But that's, for example, yes?
sum(math.comb(25, i) for i in range(0,…

BitemNet
- 53
- 4