diff --git a/dask/array/core.py b/dask/array/core.py
index 61158f7c5..08ca79f7e 100644
--- a/dask/array/core.py
+++ b/dask/array/core.py
@@ -2428,7 +2428,7 @@ def unify_chunks(*args, **kwargs):
     if not args:
         return {}, []
 
-    arginds = [(asarray(a) if ind is not None else a, ind)
+    arginds = [(asanyarray(a) if ind is not None else a, ind)
                for a, ind in partition(2, args)]  # [x, ij, y, jk]
     args = list(concat(arginds))  # [(x, ij), (y, jk)]
     warn = kwargs.get('warn', True)
@@ -2934,19 +2934,12 @@ def asarray(a, **kwargs):
     >>> da.asarray(y)
     dask.array<array, shape=(2, 3), dtype=int64, chunksize=(2, 3)>
     """
-    def frame_types():
-        try:
-            import dask.dataframe as dd
-            return (dd.Series, dd.DataFrame)
-        except ImportError:
-            return ()
-
     if isinstance(a, Array):
         return a
-    if isinstance(a, (list, tuple)) and any(isinstance(i, Array) for i in a):
-        a = stack(a)
-    elif isinstance(a, frame_types()):
+    elif hasattr(a, 'to_dask_array'):
         return a.to_dask_array()
+    elif isinstance(a, (list, tuple)) and any(isinstance(i, Array) for i in a):
+        a = stack(a)
     elif not isinstance(getattr(a, 'shape', None), Iterable):
         a = np.asarray(a)
     return from_array(a, chunks=a.shape, getitem=getter_inline, **kwargs)
diff --git a/docs/source/develop.rst b/docs/source/develop.rst
index 3e0ad25f7..d22755cb1 100644
--- a/docs/source/develop.rst
+++ b/docs/source/develop.rst
@@ -88,7 +88,7 @@ environment on your computer to compile them when installing with ``pip``::
 Install Dask and dependencies::
 
    cd dask
-   pip install -e .[complete]
+   pip install -e ".[complete]"
 
 For development, Dask uses the following additional dependencies::
 

Is Masked-array arithmetic getting masks wrong ?
Arithmetic operations between a dask array and a numpy array have the effect of ignoring any mask on the latter.

Like this :
```
>>> lazy = da.asarray([5, 6])
>>> mask = np.ma.masked_array([2, 3], mask=[0, 1])
>>> (lazy + mask).compute()
array([7, 9])
>>> 
>>> # But expected ...
... lazy.compute() + mask
masked_array(data=[7, --],
             mask=[False,  True],
       fill_value=999999)
>>> 
```

However, if we *explicitly* wrap the masked array as a dask array, all is well ...
```
>>> (lazy + da.asanyarray(mask)).compute()
masked_array(data=[1, --],
             mask=[False,  True],
       fill_value=999999)
>>> 
```

(BUT: only using `da.asanyarray` : `da.asarray` does not work)

diff --git a/dask/array/tests/test_masked.py b/dask/array/tests/test_masked.py
index 6608d2cc4..222e46c5c 100644
--- a/dask/array/tests/test_masked.py
+++ b/dask/array/tests/test_masked.py
@@ -348,3 +348,17 @@ def test_average_weights_with_masked_array():
     da_avg = da.ma.average(d_a, weights=d_weights, axis=1)
 
     assert_eq(np_avg, da_avg)
+
+
+def test_arithmetic_results_in_masked():
+    mask = np.array([[True, False],
+                     [True, True],
+                     [False, True]])
+    x = np.arange(6).reshape((3, 2))
+    masked = np.ma.array(x, mask=mask)
+    dx = da.from_array(x, chunks=(2, 2))
+
+    res = dx + masked
+    sol = x + masked
+    assert_eq(res, sol)
+    assert isinstance(res.compute(), np.ma.masked_array)

pip install -e .[complete]
parse_log_pytest
pytest
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
click==8.0.4
cloudpickle==2.2.1
coverage==6.2
-e git+https://github.com/dask/dask.git@221eb099ea8690ef7da334aa97b9a4e30e679f61#egg=dask
distributed==1.28.1
execnet==1.9.0
HeapDict==1.0.1
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
locket==1.0.0
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
msgpack==1.0.5
numpy==1.19.5
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pandas==1.1.5
partd==1.2.0
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
psutil==7.0.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
six==1.17.0
sortedcontainers==2.4.0
tblib==1.7.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
toolz==0.12.0
tornado==6.1
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zict==2.1.0
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: dask
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - click==8.0.4
      - cloudpickle==2.2.1
      - coverage==6.2
      - distributed==1.28.1
      - execnet==1.9.0
      - heapdict==1.0.1
      - locket==1.0.0
      - msgpack==1.0.5
      - numpy==1.19.5
      - pandas==1.1.5
      - partd==1.2.0
      - psutil==7.0.0
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - six==1.17.0
      - sortedcontainers==2.4.0
      - tblib==1.7.0
      - tomli==1.2.3
      - toolz==0.12.0
      - tornado==6.1
      - zict==2.1.0
prefix: /opt/conda/envs/dask

dask/array/tests/test_masked.py::test_arithmetic_results_in_masked
dask/array/tests/test_masked.py::test_tokenize_masked_array dask/array/tests/test_masked.py::test_from_array_masked_array dask/array/tests/test_masked.py::test_copy_deepcopy dask/array/tests/test_masked.py::test_basic[<lambda>0] dask/array/tests/test_masked.py::test_basic[<lambda>1] dask/array/tests/test_masked.py::test_basic[<lambda>2] dask/array/tests/test_masked.py::test_basic[<lambda>3] dask/array/tests/test_masked.py::test_basic[<lambda>4] dask/array/tests/test_masked.py::test_basic[<lambda>5] dask/array/tests/test_masked.py::test_basic[<lambda>6] dask/array/tests/test_masked.py::test_basic[<lambda>7] dask/array/tests/test_masked.py::test_basic[<lambda>8] dask/array/tests/test_masked.py::test_basic[<lambda>9] dask/array/tests/test_masked.py::test_basic[<lambda>10] dask/array/tests/test_masked.py::test_basic[<lambda>11] dask/array/tests/test_masked.py::test_basic[<lambda>12] dask/array/tests/test_masked.py::test_basic[<lambda>13] dask/array/tests/test_masked.py::test_basic[<lambda>14] dask/array/tests/test_masked.py::test_basic[<lambda>15] dask/array/tests/test_masked.py::test_basic[<lambda>16] dask/array/tests/test_masked.py::test_basic[<lambda>17] dask/array/tests/test_masked.py::test_basic[<lambda>18] dask/array/tests/test_masked.py::test_basic[<lambda>19] dask/array/tests/test_masked.py::test_basic[<lambda>20] dask/array/tests/test_masked.py::test_basic[<lambda>21] dask/array/tests/test_masked.py::test_basic[<lambda>22] dask/array/tests/test_masked.py::test_basic[<lambda>23] dask/array/tests/test_masked.py::test_basic[<lambda>24] dask/array/tests/test_masked.py::test_basic[<lambda>25] dask/array/tests/test_masked.py::test_basic[<lambda>26] dask/array/tests/test_masked.py::test_tensordot dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>0] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>1] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>2] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>3] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>4] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>5] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>6] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>7] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>8] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>9] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>10] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>11] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>12] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>13] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>14] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>15] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>16] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>17] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>18] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>19] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>20] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>21] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>22] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>23] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>24] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>25] dask/array/tests/test_masked.py::test_mixed_concatenate[<lambda>26] dask/array/tests/test_masked.py::test_mixed_random[<lambda>0] dask/array/tests/test_masked.py::test_mixed_random[<lambda>1] dask/array/tests/test_masked.py::test_mixed_random[<lambda>2] dask/array/tests/test_masked.py::test_mixed_random[<lambda>3] dask/array/tests/test_masked.py::test_mixed_random[<lambda>4] dask/array/tests/test_masked.py::test_mixed_random[<lambda>5] dask/array/tests/test_masked.py::test_mixed_random[<lambda>6] dask/array/tests/test_masked.py::test_mixed_random[<lambda>7] dask/array/tests/test_masked.py::test_mixed_random[<lambda>8] dask/array/tests/test_masked.py::test_mixed_random[<lambda>9] dask/array/tests/test_masked.py::test_mixed_random[<lambda>10] dask/array/tests/test_masked.py::test_mixed_random[<lambda>11] dask/array/tests/test_masked.py::test_mixed_random[<lambda>12] dask/array/tests/test_masked.py::test_mixed_random[<lambda>13] dask/array/tests/test_masked.py::test_mixed_random[<lambda>14] dask/array/tests/test_masked.py::test_mixed_random[<lambda>15] dask/array/tests/test_masked.py::test_mixed_random[<lambda>16] dask/array/tests/test_masked.py::test_mixed_random[<lambda>17] dask/array/tests/test_masked.py::test_mixed_random[<lambda>18] dask/array/tests/test_masked.py::test_mixed_random[<lambda>19] dask/array/tests/test_masked.py::test_mixed_random[<lambda>20] dask/array/tests/test_masked.py::test_mixed_random[<lambda>21] dask/array/tests/test_masked.py::test_mixed_random[<lambda>22] dask/array/tests/test_masked.py::test_mixed_random[<lambda>23] dask/array/tests/test_masked.py::test_mixed_random[<lambda>24] dask/array/tests/test_masked.py::test_mixed_random[<lambda>25] dask/array/tests/test_masked.py::test_mixed_random[<lambda>26] dask/array/tests/test_masked.py::test_mixed_output_type dask/array/tests/test_masked.py::test_creation_functions dask/array/tests/test_masked.py::test_filled dask/array/tests/test_masked.py::test_reductions[sum-i8] dask/array/tests/test_masked.py::test_reductions[sum-f8] dask/array/tests/test_masked.py::test_reductions[prod-i8] dask/array/tests/test_masked.py::test_reductions[prod-f8] dask/array/tests/test_masked.py::test_reductions[mean-i8] dask/array/tests/test_masked.py::test_reductions[mean-f8] dask/array/tests/test_masked.py::test_reductions[var-i8] dask/array/tests/test_masked.py::test_reductions[var-f8] dask/array/tests/test_masked.py::test_reductions[std-i8] dask/array/tests/test_masked.py::test_reductions[std-f8] dask/array/tests/test_masked.py::test_reductions[min-i8] dask/array/tests/test_masked.py::test_reductions[min-f8] dask/array/tests/test_masked.py::test_reductions[max-i8] dask/array/tests/test_masked.py::test_reductions[max-f8] dask/array/tests/test_masked.py::test_reductions[any-i8] dask/array/tests/test_masked.py::test_reductions[any-f8] dask/array/tests/test_masked.py::test_reductions[all-i8] dask/array/tests/test_masked.py::test_reductions[all-f8] dask/array/tests/test_masked.py::test_arg_reductions[argmin] dask/array/tests/test_masked.py::test_arg_reductions[argmax] dask/array/tests/test_masked.py::test_cumulative dask/array/tests/test_masked.py::test_accessors dask/array/tests/test_masked.py::test_masked_array dask/array/tests/test_masked.py::test_set_fill_value dask/array/tests/test_masked.py::test_average_weights_with_masked_array
dask/array/core.py docs/source/develop.rst
dask/array/core.py docs/source/develop.rst