Repository: dask/dask

Issue:
da.array(list) returns a list
Calling `da.array()` on a list returns the argument unchanged, i.e. the output is a list, not a dask array. This is unexpected. Either the docstring should be updated to indicate this, or the function should be changed to emit an ndarray as one would expect from the current docstring.

MRE:
```
import dask.array as da
type(da.array([0,1,2,3]))
# prints `list`
```

Discussion:

Patch:
diff --git a/dask/array/routines.py b/dask/array/routines.py
index 6c30d96da..c78f0ce4d 100644
--- a/dask/array/routines.py
+++ b/dask/array/routines.py
@@ -42,6 +42,7 @@ from .numpy_compat import _unravel_index_keyword
 
 @derived_from(np)
 def array(x, dtype=None, ndmin=None):
+    x = asarray(x)
     while ndmin is not None and x.ndim < ndmin:
         x = x[None, :]
     if dtype is not None and x.dtype != dtype:
diff --git a/dask/dataframe/io/sql.py b/dask/dataframe/io/sql.py
index c2a274793..118b6ff6a 100644
--- a/dask/dataframe/io/sql.py
+++ b/dask/dataframe/io/sql.py
@@ -144,7 +144,7 @@ def read_sql_table(
             return from_pandas(head, npartitions=1)
 
         bytes_per_row = (head.memory_usage(deep=True, index=True)).sum() / head_rows
-        meta = head[:0]
+        meta = head.iloc[:0]
     else:
         if divisions is None and npartitions is None:
             raise ValueError(
diff --git a/docs/source/institutional-faq.rst b/docs/source/institutional-faq.rst
index b0638dbf4..db60a9368 100644
--- a/docs/source/institutional-faq.rst
+++ b/docs/source/institutional-faq.rst
@@ -37,7 +37,7 @@ to computing resources in a way that is native to both the users and IT.
 institutions today, and it is a common entry point for Dask usage.
 
 
-Is Dask Mature?  Why should we trust it?
+Is Dask mature?  Why should we trust it?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Yes.  While Dask itself is relatively new (it began in 2015) it is built by the
@@ -176,7 +176,7 @@ those on Hadoop, HPC, Kubernetes, and Cloud clusters.
     For more information see :doc:`setup/kubernetes`
 
 
-Is Dask Secure?
+Is Dask secure?
 ~~~~~~~~~~~~~~~
 
 Dask is deployed today within highly secure institutions,
@@ -189,7 +189,7 @@ your institution likely already does this and uses standard technologies like
 SSL/TLS, Kerberos, and other systems with which Dask can integrate.
 
 
-Do I need to purchase a new Cluster?
+Do I need to purchase a new cluster?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 No.  It is easy to run Dask today on most clusters.
@@ -234,7 +234,7 @@ In each case Dask integrates with existing processes and technologies
 that are well understood and familiar to the institution.
 
 
-How Does Dask communicate data between machines?
+How does Dask communicate data between machines?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Dask usually communicates over TCP, using msgpack for small administrative
@@ -294,7 +294,7 @@ The *vast majority* of institutional users though do not reach this limit.
 For more information you may want to peruse our :doc:`best practices
 <best-practices>`
 
-Is Dask Resilient?  What happens when a machine goes down?
+Is Dask resilient?  What happens when a machine goes down?
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Yes, Dask is resilient to the failure of worker nodes.  It knows how it came to


Test patch:
diff --git a/dask/array/tests/test_routines.py b/dask/array/tests/test_routines.py
index e38395d5d..8fdb8e338 100644
--- a/dask/array/tests/test_routines.py
+++ b/dask/array/tests/test_routines.py
@@ -23,6 +23,14 @@ def test_array():
     assert isinstance(y, da.Array)
 
 
+def test_array_return_type():
+    # Regression test for https://github.com/dask/dask/issues/5426
+    x = [0, 1, 2, 3]
+    dx = da.array(x)
+    assert isinstance(dx, da.Array)
+    assert_eq(x, dx)
+
+
 def test_derived_docstrings():
     assert "This docstring was copied from numpy.array" in da.routines.array.__doc__
     assert "Create an array." in da.routines.array.__doc__