<commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import unittest
import numpy as np

from SimPEG import Mesh
from SimPEG import Maps


class TestWires(unittest.TestCase):

    def test_basic(self):
        mesh = Mesh.TensorMesh([10, 10, 10])

        wires = Maps.Wires(
            ('sigma', mesh.nCz),
            ('mu_casing', 1),
        )

        model = np.arange(mesh.nCz + 1)

        assert isinstance(wires.sigma, Maps.WireMap)
        assert wires.nP == mesh.nCz + 1

        named_model = wires * model

        named_model.sigma == model[:mesh.nCz]
        named_model.mu_casing = 2


if __name__ == '__main__':
    unittest.main()<commit_msg>Fix wire test.<commit_after>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import unittest
import numpy as np

from SimPEG import Mesh
from SimPEG import Maps


class TestWires(unittest.TestCase):

    def test_basic(self):
        mesh = Mesh.TensorMesh([10, 10, 10])

        wires = Maps.Wires(
            ('sigma', mesh.nCz),
            ('mu_casing', 1),
        )

        model = np.arange(mesh.nCz + 1)

        assert isinstance(wires.sigma, Maps.WireMap)
        assert wires.nP == mesh.nCz + 1

        named_model = wires * model

        named_model.sigma == model[:mesh.nCz]
        assert named_model.mu_casing == 10


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.09114249037227215, 'fraction_numerical': 0.013478818998716302, 'mean_word_length': 2.738609112709832, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '629628', 'n_tokens_mistral': 533, 'n_tokens_neox': 483, 'n_words': 132}