Skip to content

Commit

Permalink
sklearn -> scikit-learn
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHancock committed Sep 9, 2021
1 parent 0c448b9 commit 766f60c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -29,7 +29,7 @@ def get_version():
'astropy>=2.0',
'healpy >=1.10',
'lmfit>=0.9.2',
'sklearn>=0.24.2']
'scikit-learn>=0.24.2']

data_dir = 'AegeanTools/data'

Expand Down
34 changes: 34 additions & 0 deletions tests/profile_cluster.py
@@ -0,0 +1,34 @@
#! /usr/bin/env python
"""
Profile functions within the cluster module of AegeanTools
"""

from AegeanTools.cluster import regroup, regroup_vectorized
from AegeanTools import catalogs

import numpy as np
import cProfile
import pstats
import io
from pstats import SortKey


def get_cat():
# create/load a catalogue for regrouping
table = catalogs.load_table('test_GLEAMX_comp.fits')[:1000]
srccat = catalogs.table_to_source_list(table)
return srccat


def profile_regroup():
srccat = get_cat()
regroup(srccat, eps=np.sqrt(2))
return


if __name__ == "__main__":
# introspect and run all the functions starting with 'test'
for f in dir():
if f.startswith('profile'):
print(f)
globals()[f]()

0 comments on commit 766f60c

Please sign in to comment.