internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: numpy/numpy

Issue:
'choice' and 'dirichlet' missing from numpy.random.__all__
Presumably numpy/random/info.py should include 'choice' and 'dirichlet' in the `__all__` variable? Right now they aren't there.



Discussion:

Resolving patch:
diff --git a/numpy/random/info.py b/numpy/random/info.py
--- a/numpy/random/info.py
+++ b/numpy/random/info.py
@@ -13,6 +13,8 @@
 permutation          Randomly permute a sequence / generate a random sequence.
 shuffle              Randomly permute a sequence in place.
 seed                 Seed the random number generator.
+choice               Random sample from 1-D array.
+
 ==================== =========================================================
 
 ==================== =========================================================
@@ -91,6 +93,8 @@
     'binomial',
     'bytes',
     'chisquare',
+    'choice',
+    'dirichlet',
     'exponential',
     'f',
     'gamma',


Test patch:
Repository: numpy/numpy

Issue:
Subsetting recarray by fields yields a structured array
I would expect this to return a record array as well:

``` python
>>> np.rec.array([1, 2])
rec.array((1, 2), 
      dtype=[('f0', '<i8'), ('f1', '<i8')])

>>> np.rec.array([1, 2])[['f0', 'f1']]
array((1, 2), 
      dtype=[('f0', '<i8'), ('f1', '<i8')])
```



Discussion:
Hmm, I agree!

I've recently been updating recarrays to do this kind of thing properly, but I didn't think of this case in `__getitem__`. It looks like I correctly propagated the 'np.record' dtype in this case, but forgot to propagate the 'np.recarray' container. I get:

```
>>> np.rec.array([1, 2])[['f0', 'f1']]
array((1, 2), 
  dtype=(numpy.record, [('f0', '<i8'), ('f1', '<i8')]))
```

(the fact that you do not see the np.record dtype is probably because you are not using the absolute latest version of numpy, I would guess)

I'll look into a fix/enhancement.


Resolving patch:
diff --git a/numpy/core/records.py b/numpy/core/records.py
--- a/numpy/core/records.py
+++ b/numpy/core/records.py
@@ -502,6 +502,7 @@ def __getitem__(self, indx):
         # we might also be returning a single element
         if isinstance(obj, ndarray):
             if obj.dtype.fields:
+                obj = obj.view(recarray)
                 if issubclass(obj.dtype.type, nt.void):
                     return obj.view(dtype=(self.dtype.type, obj.dtype))
                 return obj


Test patch:
diff --git a/numpy/core/tests/test_records.py b/numpy/core/tests/test_records.py
--- a/numpy/core/tests/test_records.py
+++ b/numpy/core/tests/test_records.py
@@ -121,6 +121,14 @@ def test_recarray_views(self):
         assert_equal(type(rv), np.recarray)
         assert_equal(rv.dtype.type, np.record)
 
+        #check that getitem also preserves np.recarray and np.record
+        r = np.rec.array(np.ones(4, dtype=[('a', 'i4'), ('b', 'i4'), 
+                                           ('c', 'i4,i4')]))
+        assert_equal(r['c'].dtype.type, np.record)
+        assert_equal(type(r['c']), np.recarray)
+        assert_equal(r[['a', 'b']].dtype.type, np.record)
+        assert_equal(type(r[['a', 'b']]), np.recarray)
+
         # check that accessing nested structures keep record type, but
         # not for subarrays, non-void structures, non-structured voids
         test_dtype = [('a', 'f4,f4'), ('b', 'V8'), ('c', ('f4',2)),
Repository: numpy/numpy

Issue:
ma.make_mask handles ma.nomask input incorrectly.
This was a nasty little bug to chase down. I suspect `ma.mask_or` is not alone in this.

```
In [20]: np.__version__
Out[20]: '1.11.0.dev0+1d51142'

In [21]: m = ma.mask_or(ma.nomask, ma.nomask, shrink=False)

In [22]: m
Out[22]: array(False, dtype=bool)
```

Whereas

```
In [1]: np.__version__
Out[1]: '1.9.2'

In [2]: m = ma.mask_or(ma.nomask, ma.nomask, shrink=False)

In [3]: m
Out[3]: False

In [4]: m is ma.nomask
Out[4]: True
```



Discussion:
Bisect points to 8da9c711 as the first bad commit.

```
    BUG: ma.masked_values does not shrink mask if requested

    When called with the shrink parameter set to False, np.ma.masked_values
    will create a False filled array mask and not shrink the mask.
    Previously the mask would be shrunk to a single False scalar.
```

@jjhelmus I'm thinking this change is incorrect https://github.com/numpy/numpy/blob/master/numpy/ma/core.py#L1550


Resolving patch:
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1495,9 +1495,10 @@ def make_mask(m, copy=False, shrink=True, dtype=MaskType):
     shrink : bool, optional
         Whether to shrink `m` to ``nomask`` if all its values are False.
     dtype : dtype, optional
-        Data-type of the output mask. By default, the output mask has
-        a dtype of MaskType (bool). If the dtype is flexible, each field
-        has a boolean dtype.
+        Data-type of the output mask. By default, the output mask has a
+        dtype of MaskType (bool). If the dtype is flexible, each field has
+        a boolean dtype. This is ignored when `m` is ``nomask``, in which
+        case ``nomask`` is always returned.
 
     Returns
     -------
@@ -1547,7 +1548,7 @@ def make_mask(m, copy=False, shrink=True, dtype=MaskType):
           dtype=[('man', '|b1'), ('mouse', '|b1')])
 
     """
-    if m is nomask and shrink:
+    if m is nomask:
         return nomask
     elif isinstance(m, ndarray):
         # We won't return after this point to make sure we can shrink the mask


Test patch:
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -11,8 +11,10 @@
 import warnings
 import pickle
 import operator
+import itertools
 from functools import reduce
 
+
 import numpy as np
 import numpy.ma.core
 import numpy.core.fromnumeric as fromnumeric
@@ -3816,6 +3818,15 @@ def test_make_mask(self):
         assert_equal(test.dtype, bdtype)
         assert_equal(test, np.array([(0, 0), (0, 1)], dtype=bdtype))
 
+        # test that nomask is returned when m is nomask.
+        bools = [True, False]
+        dtypes = [MaskType, np.float]
+        msgformat = 'copy=%s, shrink=%s, dtype=%s'
+        for cpy, shr, dt in itertools.product(bools, bools, dtypes):
+            res = make_mask(nomask, copy=cpy, shrink=shr, dtype=dt)
+            assert_(res is nomask, msgformat % (cpy, shr, dt))
+
+
     def test_mask_or(self):
         # Initialize
         mtype = [('a', np.bool), ('b', np.bool)]
Repository: numpy/numpy

Issue:
ma.make_mask handles ma.nomask input incorrectly.
This was a nasty little bug to chase down. I suspect `ma.mask_or` is not alone in this.

```
In [20]: np.__version__
Out[20]: '1.11.0.dev0+1d51142'

In [21]: m = ma.mask_or(ma.nomask, ma.nomask, shrink=False)

In [22]: m
Out[22]: array(False, dtype=bool)
```

Whereas

```
In [1]: np.__version__
Out[1]: '1.9.2'

In [2]: m = ma.mask_or(ma.nomask, ma.nomask, shrink=False)

In [3]: m
Out[3]: False

In [4]: m is ma.nomask
Out[4]: True
```



Discussion:
Bisect points to 8da9c711 as the first bad commit.

```
    BUG: ma.masked_values does not shrink mask if requested

    When called with the shrink parameter set to False, np.ma.masked_values
    will create a False filled array mask and not shrink the mask.
    Previously the mask would be shrunk to a single False scalar.
```

@jjhelmus I'm thinking this change is incorrect https://github.com/numpy/numpy/blob/master/numpy/ma/core.py#L1550


Resolving patch:
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1495,9 +1495,10 @@ def make_mask(m, copy=False, shrink=True, dtype=MaskType):
     shrink : bool, optional
         Whether to shrink `m` to ``nomask`` if all its values are False.
     dtype : dtype, optional
-        Data-type of the output mask. By default, the output mask has
-        a dtype of MaskType (bool). If the dtype is flexible, each field
-        has a boolean dtype.
+        Data-type of the output mask. By default, the output mask has a
+        dtype of MaskType (bool). If the dtype is flexible, each field has
+        a boolean dtype. This is ignored when `m` is ``nomask``, in which
+        case ``nomask`` is always returned.
 
     Returns
     -------
@@ -1547,7 +1548,7 @@ def make_mask(m, copy=False, shrink=True, dtype=MaskType):
           dtype=[('man', '|b1'), ('mouse', '|b1')])
 
     """
-    if m is nomask and shrink:
+    if m is nomask:
         return nomask
     elif isinstance(m, ndarray):
         # We won't return after this point to make sure we can shrink the mask


Test patch:
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -11,8 +11,10 @@
 import warnings
 import pickle
 import operator
+import itertools
 from functools import reduce
 
+
 import numpy as np
 import numpy.ma.core
 import numpy.core.fromnumeric as fromnumeric
@@ -3712,6 +3714,15 @@ def test_make_mask(self):
         assert_equal(test.dtype, bdtype)
         assert_equal(test, np.array([(0, 0), (0, 1)], dtype=bdtype))
 
+        # test that nomask is returned when m is nomask.
+        bools = [True, False]
+        dtypes = [MaskType, np.float]
+        msgformat = 'copy=%s, shrink=%s, dtype=%s'
+        for cpy, shr, dt in itertools.product(bools, bools, dtypes):
+            res = make_mask(nomask, copy=cpy, shrink=shr, dtype=dt)
+            assert_(res is nomask, msgformat % (cpy, shr, dt))
+
+
     def test_mask_or(self):
         # Initialize
         mtype = [('a', np.bool), ('b', np.bool)]
Repository: numpy/numpy

Issue:
optimized blas detection broken in master and 1.10
merge of gh-6183 broke cblas detection on linux distros:

```
np.show_config().
...
blas_opt_info:
    libraries = ['blas']
    library_dirs = ['/usr/lib']
    language = f77
```

cblas is required for numpy to use it in `dot`



Discussion:
Works for me

```
blas_opt_info:
    libraries = ['tatlas']
    library_dirs = ['/usr/lib64/atlas']
    define_macros = [('HAVE_CBLAS', None), ('NO_ATLAS_INFO', -1)]
    language = c
    include_dirs = ['/usr/include']
```

I think you need to be more specific about what is broken.

you have atlas installed directly, not a generic blas like typically on debian based systems
direct atlas detection is special cased in numpy

Is it fixable using `site.cfg`?

to my knowledge no

How about something like `cc -lcblas` ? That should work for gcc, and maybe MKL and LLVM as well. 

Or, shelling out, `ldconfig -p | grep <whatever>`.

I still don't know what the issue with the original code was

See #6175.

would be simplest to just skip the check on windows then, its apparently not needed there anyway


Resolving patch:
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -1678,9 +1678,37 @@ def calc_info(self):
         info = self.check_libs(lib_dirs, blas_libs, [])
         if info is None:
             return
-        info['language'] = 'f77'  # XXX: is it generally true?
+        if platform.system() != 'Windows' and self.has_cblas():
+            # The check for windows is needed because has_cblas uses the
+            # same compiler that was used to compile Python and msvc is
+            # often not installed when mingw is being used. This rough
+            # treatment is not desirable, but windows is tricky.
+            info['language'] = 'c'
+            info['define_macros'] = [('HAVE_CBLAS', None)]
+        else:
+            info['language'] = 'f77'  # XXX: is it generally true?
         self.set_info(**info)
 
+    def has_cblas(self):
+        # primitive cblas check by looking for the header
+        res = False
+        c = distutils.ccompiler.new_compiler()
+        tmpdir = tempfile.mkdtemp()
+        s = """#include <cblas.h>"""
+        src = os.path.join(tmpdir, 'source.c')
+        try:
+            with open(src, 'wt') as f:
+                f.write(s)
+            try:
+                c.compile([src], output_dir=tmpdir,
+                          include_dirs=self.get_include_dirs())
+                res = True
+            except distutils.ccompiler.CompileError:
+                res = False
+        finally:
+            shutil.rmtree(tmpdir)
+        return res
+
 
 class openblas_info(blas_info):
     section = 'openblas'


Test patch:
Repository: numpy/numpy

Issue:
optimized blas detection broken in master and 1.10
merge of gh-6183 broke cblas detection on linux distros:

```
np.show_config().
...
blas_opt_info:
    libraries = ['blas']
    library_dirs = ['/usr/lib']
    language = f77
```

cblas is required for numpy to use it in `dot`



Discussion:
Works for me

```
blas_opt_info:
    libraries = ['tatlas']
    library_dirs = ['/usr/lib64/atlas']
    define_macros = [('HAVE_CBLAS', None), ('NO_ATLAS_INFO', -1)]
    language = c
    include_dirs = ['/usr/include']
```

I think you need to be more specific about what is broken.

you have atlas installed directly, not a generic blas like typically on debian based systems
direct atlas detection is special cased in numpy

Is it fixable using `site.cfg`?

to my knowledge no

How about something like `cc -lcblas` ? That should work for gcc, and maybe MKL and LLVM as well. 

Or, shelling out, `ldconfig -p | grep <whatever>`.

I still don't know what the issue with the original code was

See #6175.

would be simplest to just skip the check on windows then, its apparently not needed there anyway


Resolving patch:
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -1680,9 +1680,37 @@ def calc_info(self):
         info = self.check_libs(lib_dirs, blas_libs, [])
         if info is None:
             return
-        info['language'] = 'f77'  # XXX: is it generally true?
+        if platform.system() != 'Windows' and self.has_cblas():
+            # The check for windows is needed because has_cblas uses the
+            # same compiler that was used to compile Python and msvc is
+            # often not installed when mingw is being used. This rough
+            # treatment is not desirable, but windows is tricky.
+            info['language'] = 'c'
+            info['define_macros'] = [('HAVE_CBLAS', None)]
+        else:
+            info['language'] = 'f77'  # XXX: is it generally true?
         self.set_info(**info)
 
+    def has_cblas(self):
+        # primitive cblas check by looking for the header
+        res = False
+        c = distutils.ccompiler.new_compiler()
+        tmpdir = tempfile.mkdtemp()
+        s = """#include <cblas.h>"""
+        src = os.path.join(tmpdir, 'source.c')
+        try:
+            with open(src, 'wt') as f:
+                f.write(s)
+            try:
+                c.compile([src], output_dir=tmpdir,
+                          include_dirs=self.get_include_dirs())
+                res = True
+            except distutils.ccompiler.CompileError:
+                res = False
+        finally:
+            shutil.rmtree(tmpdir)
+        return res
+
 
 class openblas_info(blas_info):
     section = 'openblas'


Test patch:
Repository: numpy/numpy

Issue:
Masked arrays with nested structured multidimensional dtypes inconsistent between data and mask
This may or may not be caused by the same problem as other `numpy.ma`-related issues.  When a dtype contains a nested structured multidimensional sub-dtype, the dtype of the mask is inconsistent with the dtype of the data:

```
In [244]: Z = ma.zeros(2, dtype([("A", "(2,2)i1,(2,2)i1", (2,2))]))

In [245]: print(Z.data.dtype)
[('A', [('f0', 'i1', (2, 2)), ('f1', 'i1', (2, 2))], (2, 2))] 

In [246]: print(Z.mask.dtype)
[('A', '?', (2, 2))]

In [277]: Z.fill_value.dtype
[('A', [('f0', 'i1', (2, 2)), ('f1', 'i1', (2, 2))], (2, 2))]
```

For somewhat simpler dtypes, this problem does not occur:

```
In [260]: Z = ma.zeros(2, "(2,2)i2,(2,2)i2")

In [261]: print(Z.data.dtype)
[('f0', '<i2', (2, 2)), ('f1', '<i2', (2, 2))]

In [262]: print(Z.mask.dtype)
[('f0', '?', (2, 2)), ('f1', '?', (2, 2))]

In [281]: print(Z.fill_value.dtype)
[('f0', '<i2', (2, 2)), ('f1', '<i2', (2, 2))]
```

This is bound to lead to problems _somewhere_.  It does appear to lead to a failure when calling `Z.filled`, for example (`IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid`), although it is also possible that the `dtype` I constructed wreaks havoc elsewhere as well.



Discussion:
This is related to: #3404 #3145 #2572 #5203 and others. 

This is probably due to a bug in `numpy.ma.core.make_mask_descr` and its helper `numpy.ma.core._recursive_make_descr`.


Resolving patch:
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1248,7 +1248,7 @@ def _recursive_make_descr(datatype, newtype=bool_):
     # Is this some kind of composite a la (np.float,2)
     elif datatype.subdtype:
         mdescr = list(datatype.subdtype)
-        mdescr[0] = newtype
+        mdescr[0] = _recursive_make_descr(datatype.subdtype[0], newtype)
         return tuple(mdescr)
     else:
         return newtype


Test patch:
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -608,6 +608,13 @@ def test_filled_w_nested_dtype(self):
         control = np.array([(0, 1), (2, 0)], dtype=a['B'].dtype)
         assert_equal(test, control)
 
+        # test if mask gets set correctly (see #6760)
+        Z = numpy.ma.zeros(2, numpy.dtype([("A", "(2,2)i1,(2,2)i1", (2,2))]))
+        assert_equal(Z.data.dtype, numpy.dtype([('A', [('f0', 'i1', (2, 2)),
+                                          ('f1', 'i1', (2, 2))], (2, 2))]))
+        assert_equal(Z.mask.dtype, numpy.dtype([('A', [('f0', '?', (2, 2)),
+                                          ('f1', '?', (2, 2))], (2, 2))]))
+
     def test_filled_w_f_order(self):
         # Test filled w/ F-contiguous array
         a = array(np.array([(0, 1, 2), (4, 5, 6)], order='F'),
Repository: numpy/numpy

Issue:
ValueError when indexing numpy.ma.core.mvoid with multidimensional structured dtype
When indexing a structured masked array with a multidimensional structured dtype, resulting in a `numpy.ma.core.mvoid`, an attempt at accessing a field results in a `ValueError`, as illustrated below on the current numpy repo:

```
In [17]: numpy.version.version
Out[17]: '1.11.0.dev0+e711c95'

In [18]: A = ma.masked_array(data=[([0,1,2],), ([3,4,5],)], mask=[([True, False, False],), ([False, True, False],)], dtype=[("A", ">i2", (3,))])

In [19]: x = A[0]

In [20]: y = x["A"]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-20-795ad5dbbe43> in <module>()
----> 1 y = x["A"]

/home/users/gholl/venv/stable-3.5/lib/python3.5/site-packages/numpy/ma/core.py in __getitem__(self, indx)
   5851         """
   5852         m = self._mask
-> 5853         if m is not nomask and m[indx]:
   5854             return masked
   5855         return self._data[indx]

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
```

The problem does not occur when the structured dtype has a scalar dimension:

```
In [36]: A = ma.masked_array(data=[(1,), (2,), (3,)], mask=[(False,), (True,), (False,)], dtype=[("A", ">i2")])

In [38]: A[0]["A"]
Out[38]: 1
```



Discussion:

Resolving patch:
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -5869,6 +5869,18 @@ def __getitem__(self, indx):
 
         """
         m = self._mask
+        if isinstance(m[indx], ndarray):
+            # Can happen when indx is a multi-dimensional field:
+            # A = ma.masked_array(data=[([0,1],)], mask=[([True,
+            #                     False],)], dtype=[("A", ">i2", (2,))])
+            # x = A[0]; y = x["A"]; then y.mask["A"].size==2
+            # and we can not say masked/unmasked.
+            # The result is no longer mvoid!
+            # See also issue #6724.
+            return masked_array(
+                data=self._data[indx], mask=m[indx],
+                fill_value=self._fill_value[indx],
+                hard_mask=self._hardmask)
         if m is not nomask and m[indx]:
             return masked
         return self._data[indx]


Test patch:
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -712,6 +712,14 @@ def test_mvoid_getitem(self):
         self.assertTrue(f['a'] is masked)
         assert_equal(f[1], 4)
 
+        # exotic dtype
+        A = masked_array(data=[([0,1],)],
+                         mask=[([True, False],)],
+                         dtype=[("A", ">i2", (2,))])
+        assert_equal(A[0]["A"], A["A"][0])
+        assert_equal(A[0]["A"], masked_array(data=[0, 1],
+                         mask=[True, False], dtype=">i2"))
+
     def test_mvoid_iter(self):
         # Test iteration on __getitem__
         ndtype = [('a', int), ('b', int)]
Repository: numpy/numpy

Issue:
ENH: use linux fallocate to reserve diskspace in array.tofile
fallocate allows the filesystem to make smarter decisions about space
allocation and gives a fast failure path for insufficient space.
This is very important for filesystems that suffer a lot from
fragmentation like btrfs.
Restricted to linux only as that is the only system I know the behavior
of. Other systems might also have this system call but we don't want to
accidentally trigger explicit zeroing behavior as e.g. posix_fallocate
would when there is no support for a real fallocate.



Discussion:

Resolving patch:
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -104,7 +104,7 @@ def check_api_version(apiversion, codegen_dir):
 OPTIONAL_STDFUNCS = ["expm1", "log1p", "acosh", "asinh", "atanh",
         "rint", "trunc", "exp2", "log2", "hypot", "atan2", "pow",
         "copysign", "nextafter", "ftello", "fseeko",
-        "strtoll", "strtoull", "cbrt", "strtold_l",]
+        "strtoll", "strtoull", "cbrt", "strtold_l", "fallocate"]
 
 
 OPTIONAL_HEADERS = [


Test patch:
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -9,6 +9,7 @@
 import io
 import itertools
 import ctypes
+import os
 if sys.version_info[0] >= 3:
     import builtins
 else:
@@ -3377,6 +3378,18 @@ def fail(*args, **kwargs):
         y = np.fromfile(self.filename, dtype=self.dtype)
         assert_array_equal(y, self.x.flat)
 
+    def test_largish_file(self):
+        # check the fallocate path on files > 16MB
+        d = np.zeros(4 * 1024 ** 2)
+        d.tofile(self.filename)
+        assert_equal(os.path.getsize(self.filename), d.nbytes)
+        assert_array_equal(d, np.fromfile(self.filename));
+        # check offset
+        with open(self.filename, "r+b") as f:
+            f.seek(d.nbytes)
+            d.tofile(f)
+            assert_equal(os.path.getsize(self.filename), d.nbytes * 2)
+
     def test_file_position_after_fromfile(self):
         # gh-4118
         sizes = [io.DEFAULT_BUFFER_SIZE//8,