Showing 1 of 2 files from the diff.

@@ -2930,7 +2930,7 @@
Loading
2930 2930
    static char *kwd[] = {"start", "stop", "step", "dtype", "like", NULL};
2931 2931
    PyArray_Descr *typecode = NULL;
2932 2932
2933 -
    if (!PyArg_ParseTupleAndKeywords(args, kws, "O|OOO&$O:arange", kwd,
2933 +
    if (!PyArg_ParseTupleAndKeywords(args, kws, "|OOOO&$O:arange", kwd,
2934 2934
                &o_start,
2935 2935
                &o_stop,
2936 2936
                &o_step,
@@ -2940,6 +2940,33 @@
Loading
2940 2940
        return NULL;
2941 2941
    }
2942 2942
2943 +
    if (o_start == NULL && o_stop == NULL){
2944 +
        PyErr_SetString(PyExc_TypeError,
2945 +
                "arange() requires range to be specified.");
2946 +
        return NULL;
2947 +
    }
2948 +
2949 +
    if (kws != NULL){
2950 +
        PyObject *start_str = PyUnicode_FromString("start");
2951 +
        PyObject *stop_str = PyUnicode_FromString("stop");
2952 +
        if (PyDict_Contains(kws, start_str) == 1 &&
2953 +
                PyDict_Contains(kws, stop_str) == 0){
2954 +
            PyErr_SetString(PyExc_TypeError,
2955 +
                    "arange() requires 'stop' if 'start' is specified.");
2956 +
            Py_DECREF(start_str);
2957 +
            Py_DECREF(stop_str);
2958 +
            return NULL;
2959 +
        } else if (PyDict_Contains(kws, start_str) == 0 &&
2960 +
                       PyDict_Contains(kws, stop_str) == 1){
2961 +
            o_start = PyLong_FromLong(0);
2962 +
            Py_DECREF(start_str);
2963 +
            Py_DECREF(stop_str);
2964 +
        } else {
2965 +
            Py_DECREF(start_str);
2966 +
            Py_DECREF(stop_str);
2967 +
        }
2968 +
    }
2969 +
2943 2970
    array_function_result = array_implement_c_array_function_creation(
2944 2971
            "arange", args, kws);
2945 2972
    if (array_function_result != Py_NotImplemented) {
Files Coverage
numpy 83.77%
Project Totals (157 files) 83.77%
1
codecov:
2
  notify:
3
    require_ci_to_pass: no
4
    after_n_builds: 1
5
coverage:
6
  status:
7
    project:
8
      default:
9
        # Require 1% coverage, i.e., always succeed
10
        target: 1
11
    patch: true
12
    changes: false
13
comment: off
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading