docstr: Linspace with three arguments.
  
  This method uses first two arguments with mostly non-negative values.
  In some cases, the last argument is constrained to range [0, 1]
docstr_tok: ["Linspace","with","three","arguments",".","This","method","uses","first","two","arguments","with","mostly","non-negative","values",".","In","some","cases",",","the","last","argument","is","constrained","to","range","[","0",",","1","]"]
code: def test_linspace_broadcasted(self, xp, scp, dtype, function):
      """Linspace with three arguments.
  
      This method uses first two arguments with mostly non-negative values.
      In some cases, the last argument is constrained to range [0, 1]
      """
  
      import scipy.special  # NOQA
  
      func = getattr(scp.special, function)
      # a and b should be positive
      a = xp.linspace(-1, 21, 30, dtype=dtype)[
          :, xp.newaxis, xp.newaxis
      ]
      b = xp.linspace(-1, 21, 30, dtype=dtype)[
          xp.newaxis, :, xp.newaxis
      ]
      if function == "fdtri":
          # x should be in [0, 1] so concentrate values around that
          x = xp.linspace(-0.1, 1.3, 20, dtype=dtype)
      else:
          # x should be non-negative, but test with at least 1 negative value
          x = xp.linspace(-1, 10, 20, dtype=dtype)
      x = x[xp.newaxis, xp.newaxis, :]
      return func(a, b, x)
  
imports: import numpy
  import pytest
  import cupy
  from cupy import testing
  import cupyx.scipy.special
label_desc: Use image node_id 1 for calling the TestThreeArgumentDistributions obj's underlying member method code with example usage: obj.test_linspace_broadcasted(xp, scp, dtype, function) and returns: func