# Path: formulaic/materializers/arrow.py
# class ArrowMaterializer(PandasMaterializer):
# 
#     REGISTER_NAME = "arrow"
#     REGISTER_INPUTS = ("pyarrow.lib.Table",)
# 
#     @override
#     def _init(self):
#         self.__data_context = LazyArrowTableProxy(self.data)
# 
#     @override
#     @property
#     def data_context(self):
#         return self.__data_context


import numpy
import pandas
import pytest
import scipy.sparse as spsparse
        import pyarrow
        import pyarrow
        import pyarrow
from formulaic.materializers import ArrowMaterializer
        assert list(mm.columns) == tests[0]

        mm = materializer.get_model_matrix(formula, ensure_full_rank=False)
        assert isinstance(mm, pandas.DataFrame)
        assert mm.shape == (3, len(tests[1]))
        assert list(mm.columns) == tests[1]

    @pytest.mark.parametrize("formula,tests", ARROW_TESTS.items())
    def test_get_model_matrix_sparse(self, materializer, formula, tests):
        mm = materializer.get_model_matrix(
            formula, ensure_full_rank=True, output="sparse"
        )
        assert isinstance(mm, spsparse.csc_matrix)
        assert mm.shape == (3, len(tests[0]))
        assert list(mm.model_spec.feature_names) == tests[0]

        mm = materializer.get_model_matrix(
            formula, ensure_full_rank=False, output="sparse"
        )
        assert isinstance(mm, spsparse.csc_matrix)
        assert mm.shape == (3, len(tests[1]))
        assert list(mm.model_spec.feature_names) == tests[1]

    def test_state(self, materializer):

        mm = materializer.get_model_matrix("center(a) - 1")
        assert isinstance(mm, pandas.DataFrame)
        assert list(mm.columns) == ["center(a)"]
        assert numpy.allclose(mm["center(a)"], [-1, 0, 1])


# Path: formulaic/materializers/arrow.py
# class ArrowMaterializer(PandasMaterializer):
# 
#     REGISTER_NAME = "arrow"
#     REGISTER_INPUTS = ("pyarrow.lib.Table",)
# 
#     @override
#     def _init(self):
#         self.__data_context = LazyArrowTableProxy(self.data)
# 
#     @override
#     @property
#     def data_context(self):
#         return self.__data_context


# Path: tests/materializers/test_arrow.py
import numpy
import pandas
import pytest
import scipy.sparse as spsparse
        import pyarrow
        import pyarrow
        import pyarrow
from formulaic.materializers import ArrowMaterializer

        assert list(mm.columns) == tests[0]

        mm = materializer.get_model_matrix(formula, ensure_full_rank=False)
        assert isinstance(mm, pandas.DataFrame)
        assert mm.shape == (3, len(tests[1]))
        assert list(mm.columns) == tests[1]

    @pytest.mark.parametrize("formula,tests", ARROW_TESTS.items())
    def test_get_model_matrix_sparse(self, materializer, formula, tests):
        mm = materializer.get_model_matrix(
            formula, ensure_full_rank=True, output="sparse"
        )
        assert isinstance(mm, spsparse.csc_matrix)
        assert mm.shape == (3, len(tests[0]))
        assert list(mm.model_spec.feature_names) == tests[0]

        mm = materializer.get_model_matrix(
            formula, ensure_full_rank=False, output="sparse"
        )
        assert isinstance(mm, spsparse.csc_matrix)
        assert mm.shape == (3, len(tests[1]))
        assert list(mm.model_spec.feature_names) == tests[1]

    def test_state(self, materializer):

        mm = materializer.get_model_matrix("center(a) - 1")
        assert isinstance(mm, pandas.DataFrame)
        assert list(mm.columns) == ["center(a)"]
        assert numpy.allclose(mm["center(a)"], [-1, 0, 1])


        mm2 = ArrowMaterializer(