Remove out-of-date numpy.pxd; remove unused float16_t
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Internals
description: Related to non-user accessible pandas implementation
name: Clean

Comments:
Just updated the imports of NPY_DATETIME and NPY_TIMEDELTA.  Noticed there is some redundancy in the places they are used:

tslib:
```
cpdef object get_value_box(ndarray arr, object loc):
    [...16 lines suppressed...]
    if arr.descr.type_num == NPY_DATETIME:
        return Timestamp(util.get_value_1d(arr, i))
    elif arr.descr.type_num == NPY_TIMEDELTA:
        return Timedelta(util.get_value_1d(arr, i))
    else:
        return util.get_value_1d(arr, i)
```

index:
```
def get_value_at(ndarray arr, object loc):
    if arr.descr.type_num == NPY_DATETIME:
        return Timestamp(util.get_value_at(arr, loc))
    elif arr.descr.type_num == NPY_TIMEDELTA:
        return Timedelta(util.get_value_at(arr, loc))
    return util.get_value_at(arr, loc)

[...]
cdef class IndexEngine:
     [...]
    cpdef get_value(self, ndarray arr, object key, object tz=None):
        """
        arr : 1-dimensional ndarray
        """
        cdef:
            object loc
            void* data_ptr

        loc = self.get_loc(key)
        if PySlice_Check(loc) or cnp.PyArray_Check(loc):
            return arr[loc]
        else:
            if arr.descr.type_num == NPY_DATETIME:
                return Timestamp(util.get_value_at(arr, loc), tz=tz)
            elif arr.descr.type_num == NPY_TIMEDELTA:
                return Timedelta(util.get_value_at(arr, loc))
            return util.get_value_at(arr, loc)
```

Incidentally, index.get_value_at is never used.
pls leave float16_t around, it is a valid type (though only partially supported generally).
> pls leave float16_t around, it is a valid type (though only partially supported generally).

Can't.  This PR removes src/numpy.pxd so as to defer to the version found in setup using `numpy_incl = pkg_resources.resource_filename('numpy', 'core/include')` (equiv `np.get_include()`).  The idea being to avoid conflicting/redundant includes/namespaces.

If I add float16_t back to one of the cimports here, we get a build-time error:

```
Error compiling Cython file:
------------------------------------------------------------
...
# cython: profile=False

from numpy cimport (ndarray, float16_t, float64_t, int32_t, int64_t, uint8_t, uint64_t)
^
------------------------------------------------------------

pandas/_libs/index.pyx:3:0: 'numpy/float16_t.pxd' not found
```

Besides which, float16_t is never actually used in any of the modules it is currently cimported into.


... and looking at numpy.pxd, it looks very much like float16_t is... well I don't know what the term is:

```
cdef extern from "numpy/arrayobject.h":
    [...]
    ctypedef float        npy_float16
    ctypedef float        npy_float32
[...]

ctypedef npy_float16    float16_t
```

Is this actually an alias for float32_t?
> Is this actually an alias for float32_t?

Following that logic that you presented, then yes, it would be.
rebase
I have no idea what's going on with the test failures.  Can anyone reproduce locally?  I'd also be ok with a "this cleanup can be future-us's problem"
May be related to #18064.
No idea what's up with these failures.  Closing to focus attention on #17746, #18016, #18034.