Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Glmnet for python
(work under windows fix by cutebomb)


[![PyPI version](https://badge.fury.io/py/glmnet-py.svg)](https://badge.fury.io/py/glmnet-py)
[![GPL Licence](https://badges.frapsoft.com/os/gpl/gpl.svg?v=103)](https://opensource.org/licenses/GPL-2.0/)
Expand Down
Binary file added glmnet_python/GLMnet.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions glmnet_python/loadGlmLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def loadGlmLib():
glmlib = ctypes.cdll.LoadLibrary(glmnet_so)
return(glmlib)
elif os.name == 'nt':
# this does not currently work
raise ValueError('loadGlmlib does not currently work for windows')
# glmlib = ctypes.windll.LoadLibrary(glmnet_dll)
# work with old version glmnet.dll
glmlib = ctypes.windll.LoadLibrary(glmnet_dll)
return(glmlib)
else:
raise ValueError('loadGlmLib not yet implemented for non-posix OS')

5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
from setuptools import setup, find_packages
# from numpy.distutils.core import setup, Extension

cmd = 'gfortran ./glmnet_python/GLMnet.f -fPIC -fdefault-real-8 -shared -o ./glmnet_python/GLMnet.so'
os.system(cmd)
if os.name == 'posix':
cmd = 'gfortran ./glmnet_python/GLMnet.f -fPIC -fdefault-real-8 -shared -o ./glmnet_python/GLMnet.so'
os.system(cmd)

setup(name='glmnet_python',
version = '0.2.0',
Expand Down