From 55fe87dea06d6d32f3e547393a91a11b52b21e40 Mon Sep 17 00:00:00 2001 From: noobyogi0010 <55592987+noobyogi0010@users.noreply.github.com> Date: Thu, 12 Dec 2019 14:36:13 +0530 Subject: [PATCH 1/2] Replaced int to long To resolve the TypeError: an integer is required, I changed the value's input type to long, so that it can now support both float and int values. --- pymrmr/pymrmr.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymrmr/pymrmr.pyx b/pymrmr/pymrmr.pyx index 919dd0f..6c47484 100644 --- a/pymrmr/pymrmr.pyx +++ b/pymrmr/pymrmr.pyx @@ -16,7 +16,7 @@ cdef extern from 'mrmr.cpp': unsigned long _nfeats) except + def mRMR(data, method, nfeats): - cdef vector[vector[int]] _data = data.copy().values + cdef vector[vector[long]] _data = data.copy().values cdef vector[string] _names = [s.encode('utf-8') for s in data.columns] if method == 'MID': _method = 0 From 677908af53b118c9446f131ee49bf82009f1eaf2 Mon Sep 17 00:00:00 2001 From: noobyogi0010 <55592987+noobyogi0010@users.noreply.github.com> Date: Thu, 12 Dec 2019 14:46:09 +0530 Subject: [PATCH 2/2] Replaced int vector to long vector --- pymrmr/pymrmr.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymrmr/pymrmr.pyx b/pymrmr/pymrmr.pyx index 6c47484..43c5402 100644 --- a/pymrmr/pymrmr.pyx +++ b/pymrmr/pymrmr.pyx @@ -10,7 +10,7 @@ __version__ = '0.1.1' cdef extern from 'mrmr.cpp': cdef vector[unsigned long] _mRMR( - vector[vector[int]] _data, + vector[vector[long]] _data, vector[string] _names, int _method, unsigned long _nfeats) except +