code: def test_array_interface(self):
      # Regression test for https://github.com/numpy/numpy/pull/6659
      # Ensure that start/stop can be objects that implement
      # __array_interface__ and are convertible to numeric scalars
  
      class Arrayish:
          """
          A generic object that supports the __array_interface__ and hence
          can in principle be converted to a numeric scalar, but is not
          otherwise recognized as numeric, but also happens to support
          multiplication by floats.
  
          Data should be an object that implements the buffer interface,
          and contains at least 4 bytes.
          """
  
          def __init__(self, data):
              self._data = data
  
          @property
          def __array_interface__(self):
              return {
                  "shape": (),
                  "typestr": "<i4",
                  "data": self._data,
                  "version": 3,
              }
  
          def __mul__(self, other):
              # For the purposes of this test any multiplication is an
              # identity operation :)
              return self
  
      one = Arrayish(array(1, dtype="<i4"))
      five = Arrayish(array(5, dtype="<i4"))
  
      assert_equal(linspace(one, five), linspace(1, 5))
  
imports: import pytest
  from numpy import logspace, linspace, geomspace, dtype, array, sctypes, arange, isnan, ndarray, sqrt, nextafter, stack, errstate
  from numpy.testing import assert_, assert_equal, assert_raises, assert_array_equal, assert_allclose
label_desc: Use image node_id 10 for calling the TestLinspace obj's underlying member method code with example usage: obj.test_array_interface() and returns: dict, self