<p dir="auto">Note: this works fine with Python 2.7 on Windows.</p>
<p dir="auto">Snippet:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np

arr = np.empty(3, dtype='&lt;U3')
unicode_scalar = np.array(['asd'])[0]
arr.fill(unicode_scalar.tolist())  # works with python str
print(arr)

arr.fill(unicode_scalar)  # fills the array with some garbage
print(arr)  # UnicodeDecodeError"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">empty</span>(<span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'&lt;U3'</span>)
<span class="pl-s1">unicode_scalar</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s">'asd'</span>])[<span class="pl-c1">0</span>]
<span class="pl-s1">arr</span>.<span class="pl-en">fill</span>(<span class="pl-s1">unicode_scalar</span>.<span class="pl-en">tolist</span>())  <span class="pl-c"># works with python str</span>
<span class="pl-en">print</span>(<span class="pl-s1">arr</span>)

<span class="pl-s1">arr</span>.<span class="pl-en">fill</span>(<span class="pl-s1">unicode_scalar</span>)  <span class="pl-c"># fills the array with some garbage</span>
<span class="pl-en">print</span>(<span class="pl-s1">arr</span>)  <span class="pl-c"># UnicodeDecodeError</span></pre></div>
<p dir="auto">Full Exception:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
&lt;ipython-input-8-5a844f3e15b5&gt; in &lt;module&gt;()
----&gt; 1 print(arr)  # UnicodeDecodeError

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\numeric.py in array_str(a, max_line_width, precision, suppress_small)
   1773
   1774     &quot;&quot;&quot;
-&gt; 1775     return array2string(a, max_line_width, precision, suppress_small, ' ', &quot;&quot;, str)
   1776
   1777 def set_string_function(f, repr=True):

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\arrayprint.py in array2string(a, max_line_width, precision, suppress_small, separator, prefix, style, formatter)
    445     else:
    446         lst = _array2string(a, max_line_width, precision, suppress_small,
--&gt; 447                             separator, prefix, formatter=formatter)
    448     return lst
    449

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\arrayprint.py in _array2string(a, max_line_width, precision, suppress_small, separator, prefix, formatter)
    323     lst = _formatArray(a, format_function, len(a.shape), max_line_width,
    324                        next_line_prefix, separator,
--&gt; 325                        _summaryEdgeItems, summary_insert)[:-1]
    326     return lst
    327

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\arrayprint.py in _formatArray(a, format_function, rank, max_line_len, next_line_prefix, separator, edge_items, summary_insert)
    491
    492         for i in range(trailing_items, 1, -1):
--&gt; 493             word = format_function(a[-i]) + separator
    494             s, line = _extendLine(s, line, word, max_line_len, next_line_prefix)
    495

UnicodeDecodeError: 'utf-32-le' codec can't decode bytes in position 0-3: code point not in range(0x110000)"><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
&lt;ipython-input-8-5a844f3e15b5&gt; in &lt;module&gt;()
----&gt; 1 print(arr)  # UnicodeDecodeError

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\numeric.py in array_str(a, max_line_width, precision, suppress_small)
   1773
   1774     """
-&gt; 1775     return array2string(a, max_line_width, precision, suppress_small, ' ', "", str)
   1776
   1777 def set_string_function(f, repr=True):

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\arrayprint.py in array2string(a, max_line_width, precision, suppress_small, separator, prefix, style, formatter)
    445     else:
    446         lst = _array2string(a, max_line_width, precision, suppress_small,
--&gt; 447                             separator, prefix, formatter=formatter)
    448     return lst
    449

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\arrayprint.py in _array2string(a, max_line_width, precision, suppress_small, separator, prefix, formatter)
    323     lst = _formatArray(a, format_function, len(a.shape), max_line_width,
    324                        next_line_prefix, separator,
--&gt; 325                        _summaryEdgeItems, summary_insert)[:-1]
    326     return lst
    327

C:\Users\lesteve\Miniconda3\lib\site-packages\numpy\core\arrayprint.py in _formatArray(a, format_function, rank, max_line_len, next_line_prefix, separator, edge_items, summary_insert)
    491
    492         for i in range(trailing_items, 1, -1):
--&gt; 493             word = format_function(a[-i]) + separator
    494             s, line = _extendLine(s, line, word, max_line_len, next_line_prefix)
    495

UnicodeDecodeError: 'utf-32-le' codec can't decode bytes in position 0-3: code point not in range(0x110000)
</code></pre></div>
<p dir="auto">Follows on from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7725313" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/1123" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/1123/hovercard" href="https://github.com/numpy/numpy/issues/1123">#1123</a></p>
<p dir="auto">I'm assigning a numpy.unicode_ to a slice of array of numpy.unicode_ and see the following:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [85]: l = np.array([u'blah',u'blah',u'blah'])

In [87]: type(l[0])
Out[87]: numpy.unicode_

In [88]: v = np.unicode_('bubu')

In [89]: l[0] = v

In [90]: l
Out[90]: 
array([u'bubu', u'blah', u'blah'], 
      dtype='&lt;U4')

In [91]: l[1:3] = v

&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
In [92]: l
Out[92]: 
array([u'bubu', u'\uf500\udc62\uf500\udc62\u8d00\udc00',
       u'\uf500\udc62\uf500\udc62\u8d00\udc00'], 
      dtype='&lt;U4')
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; I consider this a problem

In [93]: {k: v for k, v in sysconfig.get_config_vars().items() if 'unicode' in k.lower()}
Out[93]: 
{'PY_UNICODE_TYPE': 'unsigned short',
 'Py_UNICODE_SIZE': 2,
 'Py_USING_UNICODE': 1,
 'UNICODE_OBJS': 'Objects/unicodeobject.o Objects/unicodectype.o'}

In [94]: np.**version**
Out[94]: '1.7.1'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">85</span>]: <span class="pl-s1">l</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s">u'blah'</span>,<span class="pl-s">u'blah'</span>,<span class="pl-s">u'blah'</span>])

<span class="pl-v">In</span> [<span class="pl-c1">87</span>]: <span class="pl-en">type</span>(<span class="pl-s1">l</span>[<span class="pl-c1">0</span>])
<span class="pl-v">Out</span>[<span class="pl-c1">87</span>]: <span class="pl-s1">numpy</span>.<span class="pl-s1">unicode_</span>

<span class="pl-v">In</span> [<span class="pl-c1">88</span>]: <span class="pl-s1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">unicode_</span>(<span class="pl-s">'bubu'</span>)

<span class="pl-v">In</span> [<span class="pl-c1">89</span>]: <span class="pl-s1">l</span>[<span class="pl-c1">0</span>] <span class="pl-c1">=</span> <span class="pl-s1">v</span>

<span class="pl-v">In</span> [<span class="pl-c1">90</span>]: <span class="pl-s1">l</span>
<span class="pl-v">Out</span>[<span class="pl-c1">90</span>]: 
<span class="pl-en">array</span>([<span class="pl-s">u'bubu'</span>, <span class="pl-s">u'blah'</span>, <span class="pl-s">u'blah'</span>], 
      <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'&lt;U4'</span>)

<span class="pl-v">In</span> [<span class="pl-c1">91</span>]: <span class="pl-s1">l</span>[<span class="pl-c1">1</span>:<span class="pl-c1">3</span>] <span class="pl-c1">=</span> <span class="pl-s1">v</span>

<span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;</span>
<span class="pl-v">In</span> [<span class="pl-c1">92</span>]: <span class="pl-s1">l</span>
<span class="pl-v">Out</span>[<span class="pl-c1">92</span>]: 
<span class="pl-en">array</span>([<span class="pl-s">u'bubu'</span>, <span class="pl-s">u'<span class="pl-cce">\uf500</span><span class="pl-cce">\udc62</span><span class="pl-cce">\uf500</span><span class="pl-cce">\udc62</span><span class="pl-cce">\u8d00</span><span class="pl-cce">\udc00</span>'</span>,
       <span class="pl-s">u'<span class="pl-cce">\uf500</span><span class="pl-cce">\udc62</span><span class="pl-cce">\uf500</span><span class="pl-cce">\udc62</span><span class="pl-cce">\u8d00</span><span class="pl-cce">\udc00</span>'</span>], 
      <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'&lt;U4'</span>)
<span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span> <span class="pl-v">I</span> <span class="pl-s1">consider</span> <span class="pl-s1">this</span> <span class="pl-s1">a</span> <span class="pl-s1">problem</span>

<span class="pl-v">In</span> [<span class="pl-c1">93</span>]: {<span class="pl-s1">k</span>: <span class="pl-s1">v</span> <span class="pl-k">for</span> <span class="pl-s1">k</span>, <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">sysconfig</span>.<span class="pl-en">get_config_vars</span>().<span class="pl-en">items</span>() <span class="pl-k">if</span> <span class="pl-s">'unicode'</span> <span class="pl-c1">in</span> <span class="pl-s1">k</span>.<span class="pl-en">lower</span>()}
<span class="pl-v">Out</span>[<span class="pl-c1">93</span>]: 
{<span class="pl-s">'PY_UNICODE_TYPE'</span>: <span class="pl-s">'unsigned short'</span>,
 <span class="pl-s">'Py_UNICODE_SIZE'</span>: <span class="pl-c1">2</span>,
 <span class="pl-s">'Py_USING_UNICODE'</span>: <span class="pl-c1">1</span>,
 <span class="pl-s">'UNICODE_OBJS'</span>: <span class="pl-s">'Objects/unicodeobject.o Objects/unicodectype.o'</span>}

<span class="pl-v">In</span> [<span class="pl-c1">94</span>]: <span class="pl-s1">np</span>.<span class="pl-c1">**</span><span class="pl-s1">version</span><span class="pl-c1">**</span>
<span class="pl-v">Out</span>[<span class="pl-c1">94</span>]: <span class="pl-s">'1.7.1'</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ uname -a
Linux ... 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">$ uname -a
Linux ... 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
</code></pre></div>
<p dir="auto">On a wide unicode build I can do the same with no problem:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [81]: l = np.array([u'blah',u'blah',u'blah'])

In [82]: type(l[0])
Out[82]: numpy.unicode_

In [83]: v = np.unicode_('bubu')

In [84]: l[0] = v

In [85]: l
Out[85]: 
array([u'bubu', u'blah', u'blah'], 
      dtype='&lt;U4')

In [86]: l[1:3] = v

&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
In [87]: l
Out[87]: 
array([u'bubu', u'bubu', u'bubu'], 
      dtype='&lt;U4')
&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this works fine

In [88]: {k: v for k, v in sysconfig.get_config_vars().items() if 'unicode' in k.lower()}
Out[88]: 
{'PY_UNICODE_TYPE': 0,
 'Py_UNICODE_SIZE': 4,
 'Py_USING_UNICODE': 1,
 'UNICODE_OBJS': 'Objects/unicodeobject.o Objects/unicodectype.o'}

In [89]: np.**version**
Out[89]: '1.7.1'"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">81</span>]: <span class="pl-s1">l</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s">u'blah'</span>,<span class="pl-s">u'blah'</span>,<span class="pl-s">u'blah'</span>])

<span class="pl-v">In</span> [<span class="pl-c1">82</span>]: <span class="pl-en">type</span>(<span class="pl-s1">l</span>[<span class="pl-c1">0</span>])
<span class="pl-v">Out</span>[<span class="pl-c1">82</span>]: <span class="pl-s1">numpy</span>.<span class="pl-s1">unicode_</span>

<span class="pl-v">In</span> [<span class="pl-c1">83</span>]: <span class="pl-s1">v</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">unicode_</span>(<span class="pl-s">'bubu'</span>)

<span class="pl-v">In</span> [<span class="pl-c1">84</span>]: <span class="pl-s1">l</span>[<span class="pl-c1">0</span>] <span class="pl-c1">=</span> <span class="pl-s1">v</span>

<span class="pl-v">In</span> [<span class="pl-c1">85</span>]: <span class="pl-s1">l</span>
<span class="pl-v">Out</span>[<span class="pl-c1">85</span>]: 
<span class="pl-en">array</span>([<span class="pl-s">u'bubu'</span>, <span class="pl-s">u'blah'</span>, <span class="pl-s">u'blah'</span>], 
      <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'&lt;U4'</span>)

<span class="pl-v">In</span> [<span class="pl-c1">86</span>]: <span class="pl-s1">l</span>[<span class="pl-c1">1</span>:<span class="pl-c1">3</span>] <span class="pl-c1">=</span> <span class="pl-s1">v</span>

<span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;</span>
<span class="pl-v">In</span> [<span class="pl-c1">87</span>]: <span class="pl-s1">l</span>
<span class="pl-v">Out</span>[<span class="pl-c1">87</span>]: 
<span class="pl-en">array</span>([<span class="pl-s">u'bubu'</span>, <span class="pl-s">u'bubu'</span>, <span class="pl-s">u'bubu'</span>], 
      <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">'&lt;U4'</span>)
<span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span><span class="pl-c1">&lt;&lt;</span> <span class="pl-s1">this</span> <span class="pl-s1">works</span> <span class="pl-s1">fine</span>

<span class="pl-v">In</span> [<span class="pl-c1">88</span>]: {<span class="pl-s1">k</span>: <span class="pl-s1">v</span> <span class="pl-k">for</span> <span class="pl-s1">k</span>, <span class="pl-s1">v</span> <span class="pl-c1">in</span> <span class="pl-s1">sysconfig</span>.<span class="pl-en">get_config_vars</span>().<span class="pl-en">items</span>() <span class="pl-k">if</span> <span class="pl-s">'unicode'</span> <span class="pl-c1">in</span> <span class="pl-s1">k</span>.<span class="pl-en">lower</span>()}
<span class="pl-v">Out</span>[<span class="pl-c1">88</span>]: 
{<span class="pl-s">'PY_UNICODE_TYPE'</span>: <span class="pl-c1">0</span>,
 <span class="pl-s">'Py_UNICODE_SIZE'</span>: <span class="pl-c1">4</span>,
 <span class="pl-s">'Py_USING_UNICODE'</span>: <span class="pl-c1">1</span>,
 <span class="pl-s">'UNICODE_OBJS'</span>: <span class="pl-s">'Objects/unicodeobject.o Objects/unicodectype.o'</span>}

<span class="pl-v">In</span> [<span class="pl-c1">89</span>]: <span class="pl-s1">np</span>.<span class="pl-c1">**</span><span class="pl-s1">version</span><span class="pl-c1">**</span>
<span class="pl-v">Out</span>[<span class="pl-c1">89</span>]: <span class="pl-s">'1.7.1'</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(my27py)pavel@pavel-ThinkPad-T520:~$ uname -a
Linux pavel-ThinkPad-T520 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">(my27py)pavel@pavel-ThinkPad-T520:~$ uname -a
Linux pavel-ThinkPad-T520 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
</code></pre></div>