Commit 70bfd2a5 authored by Fize Jacques's avatar Fize Jacques
Browse files


parent e792fee2
......@@ -4,16 +4,17 @@ import numpy as np
cimport numpy as np
import networkx as nx
cdef np.ndarray minmax_scale(np.ndarray matrix):
cpdef np.ndarray minmax_scale(np.ndarray matrix):
Optimize so it can works with Cython
:param matrix:
cdef double min_,max_
return matrix/(max_-min_)
cdef np.ndarray x
return x/(max_)
......@@ -179,6 +180,7 @@ cdef class Base:
if not self.normalized:
return 1-matrix
cpdef np.ndarray similarity(self, np.ndarray matrix):
Return a normalized similarity matrix
import setuptools
#import setuptools
import sys, os, shutil
from distutils.core import setup
from distutils.extension import Extension
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment