Skip to content

Commit

Permalink
Merge pull request #337 from hameerabbasi/numba-49
Browse files Browse the repository at this point in the history
Prepare for Numba 0.49.
  • Loading branch information
hameerabbasi authored Apr 20, 2020
2 parents b642e11 + 87bc45e commit f6b3465
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ target/
# IDE
.idea/
.vscode/
default.profraw

# Sandbox
sandbox.py
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
jobs:
- job: Linux
variables:
python_version: '3.5'
python_version: '3.6'
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
Python38:
python_version: '3.8'
Python37:
python_version: '3.7'
Python36:
python_version: '3.6'
Python35:
python_version: '3.5'
ArrayFunction:
NUMPY_EXPERIMENTAL_ARRAY_FUNCTION: '1'
NUMPY_VERSION: '==1.16.2'
- job: MacOS
variables:
python_version: '3.5'
python_version: '3.6'
pool:
vmImage: 'macos-10.14'
steps:
- template: ci/azure-steps.yml
- job: Windows
variables:
python_version: '3.5'
python_version: '3.6'
pool:
vmImage: 'vs2017-win2016'
steps:
Expand Down
16 changes: 16 additions & 0 deletions ci/environment-3.8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: py38-sparse-test
channels:
- conda-forge
dependencies:
- python=3.8
- pip
- pytest
- numpy
- scipy
- pytest-cov
- nomkl
- numba
- black
- codecov
- pip:
- pytest-black
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
todo_include_todos = False

autosummary_generate = True
autosummary_generate_overwrite = False

# -- Options for HTML output ----------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy
scipy>=0.19
numba>=0.45
numba>=0.49
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def parse_requires():
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
Expand All @@ -74,5 +74,5 @@ def parse_requires():
entry_points={
"numba_extensions": ["init = sparse._numba_extension:_init_extension"]
},
python_requires=">=3.5, <4",
python_requires=">=3.6, <4",
)
2 changes: 1 addition & 1 deletion sparse/_coo/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ def _dot_coo_coo_type(dt1, dt2):
@numba.jit(
nopython=True,
nogil=True,
locals={"data_curr": numba.numpy_support.from_dtype(dtr)},
locals={"data_curr": numba.np.numpy_support.from_dtype(dtr)},
)
def _dot_coo_coo(coords1, data1, coords2, data2): # pragma: no cover
"""
Expand Down
10 changes: 5 additions & 5 deletions sparse/_coo/numba_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
make_attribute_wrapper,
type_callable,
)
from numba.targets.imputils import impl_ret_borrowed, lower_constant, lower_builtin
from numba.typing.typeof import typeof_impl
from numba import cgutils, types
from numba.core.imputils import impl_ret_borrowed, lower_constant, lower_builtin
from numba.core.typing.typeof import typeof_impl
from numba.core import cgutils, types
from sparse._utils import _zero_of_dtype
import contextlib

Expand Down Expand Up @@ -83,8 +83,8 @@ def type_COO(context):
# TODO: accept a fill_value kwarg
def typer(coords, data, shape):
return COOType(
coords_dtype=numba.numpy_support.as_dtype(coords.dtype),
data_dtype=numba.numpy_support.as_dtype(data.dtype),
coords_dtype=numba.np.numpy_support.as_dtype(coords.dtype),
data_dtype=numba.np.numpy_support.as_dtype(data.dtype),
ndim=len(shape),
)

Expand Down

0 comments on commit f6b3465

Please sign in to comment.