bug in np.full / lax.full for DeviceArray wrapped scalars
If you pass in a jax-wrapped scalar as the fill-constant value to np.fill, it breaks, e.g.:
```python
np.full((1,1), np.array([1])[0])
```
this hits the condition in lax.full:
```python
 elif isinstance(fill_value, xla.DeviceValue):
    return FilledConstant(convert_element_type(fill_value, dtype), shape)
```
no matter what dtype is, the convert_element_type result is still a DeviceArray, then
this line in lax.FillConstant:
```python
class FilledConstant(xla.DeviceConstant):
  __slots__ = ["fill_value"]

  def __init__(self, fill_value, shape):
    assert type(fill_value) is onp.ndarray
```
wants the fill value to be an onp ndarray instead.

I'm not too certain about the type logic here to make a PR confidently.
diff --git a/jax/lax.py b/jax/lax.py
index b7b8d60d4..444c86b44 100644
--- a/jax/lax.py
+++ b/jax/lax.py
@@ -462,7 +462,8 @@ def full(shape, fill_value, dtype):
   if onp.isscalar(fill_value) or type(fill_value) is onp.ndarray:
     return FilledConstant(onp.asarray(fill_value, dtype), shape)
   elif isinstance(fill_value, xla.DeviceValue):
-    return FilledConstant(convert_element_type(fill_value, dtype), shape)
+    val = onp.asarray(fill_value, dtype)
+    return FilledConstant(val, shape)
   else:
     return broadcast(convert_element_type(fill_value, dtype), shape)
 
diff --git a/tests/lax_numpy_test.py b/tests/lax_numpy_test.py
index d98c3dd58..8902380a2 100644
--- a/tests/lax_numpy_test.py
+++ b/tests/lax_numpy_test.py
@@ -1187,7 +1187,6 @@ class LaxBackedNumpyTests(jtu.JaxTestCase):
       self._CheckAgainstNumpy(lnp_op, onp_op, args_maker, check_dtypes=True)
     self._CompileAndCheck(lnp_op, args_maker, check_dtypes=True)
 
-
   @parameterized.named_parameters(jtu.cases_from_list(
       {"testcase_name": "_shape={}_n={}_increasing={}".format(
           jtu.format_shape_dtype_string([shape], dtype),
@@ -1207,6 +1206,10 @@ class LaxBackedNumpyTests(jtu.JaxTestCase):
     self._CheckAgainstNumpy(onp_fun, lnp_fun, args_maker, check_dtypes=False)
     self._CompileAndCheck(lnp_fun, args_maker, check_dtypes=False)
 
+  def testIssue330(self):
+    x = lnp.full((1, 1), lnp.array([1])[0])  # doesn't crash
+    self.assertEqual(x[0, 0], 1)
+
 
 if __name__ == "__main__":
   absltest.main()
['jax/lax.py', 'tests/lax_numpy_test.py']