Skip to content

Commit

Permalink
Remove everything from main namespace
Browse files Browse the repository at this point in the history
Instead, everything should be explicitly imported from its
specific submodule.
  • Loading branch information
tbekolay committed Jun 4, 2018
1 parent af425ad commit f3aecf2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions docs/deeplearning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ Networks
Processes
=========

.. autoclass:: nengo_extras.Conv2d
.. autoclass:: nengo_extras.convnet.Conv2d

.. autoclass:: nengo_extras.Pool2d
.. autoclass:: nengo_extras.convnet.Pool2d
6 changes: 0 additions & 6 deletions nengo_extras/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
from .version import version as __version__
from .rc import rc

# --- nengo_extras namespace (API)
from .convnet import Conv2d, Pool2d
from .neurons import FastLIF, SoftLIFRate
from . import (
camera, data, dists, graphviz, gui, networks, neurons, probe, vision)

__copyright__ = "2015-2018, Applied Brain Research"
__license__ = "Free for non-commercial use; see LICENSE.rst"
2 changes: 1 addition & 1 deletion nengo_extras/tests/test_convnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import nengo
from nengo.utils.stdlib import Timer

from nengo_extras import Conv2d, Pool2d
from nengo_extras.convnet import Conv2d, Pool2d


@pytest.mark.parametrize('local', [False, True])
Expand Down
4 changes: 2 additions & 2 deletions nengo_extras/tests/test_keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_softlif_layer(noise_model, plt):

x = np.linspace(-10, 30, nx)
y = model.predict(np.ones((ni, 1)) * x)
y0 = nengo_extras.SoftLIFRate(**params).rates(x, 1., 1.)
y0 = nengo_extras.neurons.SoftLIFRate(**params).rates(x, 1., 1.)

plt.plot(x, y.mean(axis=0), 'b')
if noise_model != 'none':
Expand Down Expand Up @@ -58,7 +58,7 @@ def test_softlif_derivative(noise_model, plt):

x = np.linspace(-10, 30, 1024).reshape(-1, 1)
dy = df([x])[0]
dy0 = nengo_extras.SoftLIFRate(**params).derivative(x, 1., 1.)
dy0 = nengo_extras.neurons.SoftLIFRate(**params).derivative(x, 1., 1.)

plt.plot(x, dy)
plt.plot(x, dy0, 'k--')
Expand Down
3 changes: 1 addition & 2 deletions nengo_extras/tests/test_neurons.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import numpy as np
import pytest

from nengo_extras import FastLIF, SoftLIFRate
from nengo_extras.neurons import rates_isi, rates_kernel
from nengo_extras.neurons import FastLIF, rates_isi, rates_kernel, SoftLIFRate


def test_softlifrate_rates(plt):
Expand Down

0 comments on commit f3aecf2

Please sign in to comment.