nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: samchungy/zod-openapi
Pull request #358 (2024-11-07 12:28:42)

Add `multipleOf` support


Patch:
diff --git a/README.md b/README.md
index cd68a08..5d0e4fc 100644
--- a/README.md
+++ b/README.md
@@ -717,7 +717,8 @@ For example in `z.string().nullable()` will be rendered differently
 - ZodNullable
 - ZodNumber
   - `integer` `type` mapping for `.int()`
-  - `exclusiveMin`/`min`/`exclusiveMax`/`max` mapping for `.min()`, `.max()`, `lt()`, `gt()`
+  - `exclusiveMin`/`min`/`exclusiveMax`/`max` mapping for `.min()`, `.max()`, `lt()`, `gt()`, `.positive()`, `.negative()`, `.nonnegative()`, `.nonpositive()`.
+  - `multipleOf` mapping for `.multipleOf()`
 - ZodObject
   - `additionalProperties` mapping for `.catchall()`, `.strict()`
   - `allOf` mapping for `.extend()` when the base object is registered and does not have `catchall()`, `strict()` and extension does not override a field.
diff --git a/src/create/schema/parsers/number.ts b/src/create/schema/parsers/number.ts
index b895295..e9a6e6c 100644
--- a/src/create/schema/parsers/number.ts
+++ b/src/create/schema/parsers/number.ts
@@ -13,17 +13,26 @@ export const createNumberSchema = (
 
   const minimum = mapMinimum(zodNumberChecks, state.components.openapi);
   const maximum = mapMaximum(zodNumberChecks, state.components.openapi);
+  const multipleOf = mapMultipleOf(zodNumberChecks);
 
   return {
     type: 'schema',
     schema: {
       type: mapNumberType(zodNumberChecks),
+      ...(multipleOf && multipleOf),
       ...(minimum && (minimum as oas31.SchemaObject)), // Union types are not easy to tame
       ...(maximum && (maximum as oas31.SchemaObject)),
     },
   };
 };
 
+export const mapMultipleOf = (
+  zodNumberCheck: ZodNumberCheckMap,
+): Pick<oas31.SchemaObject | oas30.SchemaObject, 'multipleOf'> | undefined =>
+  zodNumberCheck.multipleOf
+    ? { multipleOf: zodNumberCheck.multipleOf.value }
+    : undefined;
+
 export const mapMaximum = (
   zodNumberCheck: ZodNumberCheckMap,
   openapi: ZodOpenApiVersion,


Test patch:
diff --git a/src/create/schema/parsers/number.test.ts b/src/create/schema/parsers/number.test.ts
index d61737b..6809e51 100644
--- a/src/create/schema/parsers/number.test.ts
+++ b/src/create/schema/parsers/number.test.ts
@@ -104,4 +104,19 @@ describe('createNumberSchema', () => {
 
     expect(result).toStrictEqual(expected);
   });
+
+  it('supports multipleOf', () => {
+    const expected: Schema = {
+      type: 'schema',
+      schema: {
+        type: 'number',
+        multipleOf: 2,
+      },
+    };
+    const schema = z.number().multipleOf(2);
+
+    const result = createNumberSchema(schema, createOutputState());
+
+    expect(result).toStrictEqual(expected);
+  });
 });
Repository: samchungy/zod-openapi
Pull request #426 (2025-03-29 01:26:18)

Fix nullable const/enum behaviour
Resolves https://github.com/samchungy/zod-openapi/issues/425


Patch:
diff --git a/src/create/schema/parsers/nullable.ts b/src/create/schema/parsers/nullable.ts
index 1fe617a..0ccb53d 100644
--- a/src/create/schema/parsers/nullable.ts
+++ b/src/create/schema/parsers/nullable.ts
@@ -52,13 +52,29 @@ export const createNullableSchema = <T extends ZodTypeAny>(
       };
     }
 
-    const { type, ...schema } = schemaObject.schema;
+    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+    const { type, const: schemaConst, ...schema } = schemaObject.schema;
+
+    if (schemaConst) {
+      return {
+        type: 'schema',
+        schema: {
+          type: mapNullType(type),
+          enum: [schemaConst, null],
+          ...schema,
+        } as oas31.SchemaObject,
+        effects: schemaObject.effects,
+      };
+    }
 
     return {
       type: 'schema',
       schema: {
         type: mapNullType(type),
         ...schema,
+        // https://github.com/json-schema-org/json-schema-spec/issues/258
+        // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+        ...(schema.enum && { enum: [...schema.enum, null] }),
       },
       effects: schemaObject.effects,
     };


Test patch:
diff --git a/src/create/schema/parsers/nullable.test.ts b/src/create/schema/parsers/nullable.test.ts
index 528855d..c284edc 100644
--- a/src/create/schema/parsers/nullable.test.ts
+++ b/src/create/schema/parsers/nullable.test.ts
@@ -238,7 +238,7 @@ describe('createNullableSchema', () => {
         type: 'schema',
         schema: {
           type: ['string', 'null'],
-          enum: ['a'],
+          enum: ['a', null],
         },
       };
       const schema = z.enum(['a']).nullable();
@@ -247,5 +247,20 @@ describe('createNullableSchema', () => {
 
       expect(result).toEqual(expected);
     });
+
+    it('creates a nullable enum from a literal', () => {
+      const expected: Schema = {
+        type: 'schema',
+        schema: {
+          type: ['string', 'null'],
+          enum: ['a', null],
+        },
+      };
+      const schema = z.literal('a').nullable();
+
+      const result = createNullableSchema(schema, createOutputState());
+
+      expect(result).toEqual(expected);
+    });
   });
 });
Repository: typescript-eslint/tslint-to-eslint-config
Pull request #236 (2019-10-11 08:33:09)

Output optimizing for unsupported rules
## PR Checklist
-   [x] Addresses an existing issue: ref #233
-   [x] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslint/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview

Mention the logfile and that tslint is now used for some rules, not all.


Patch:
diff --git a/src/reporting/reportConversionResults.ts b/src/reporting/reportConversionResults.ts
index 9aceae1..2eb2a1a 100644
--- a/src/reporting/reportConversionResults.ts
+++ b/src/reporting/reportConversionResults.ts
@@ -62,7 +62,7 @@ const logMissingRules = (missing: TSLintRuleOptions[], logger: Logger) => {
                 : " rules do not yet have ESLint equivalents",
         ),
     );
-    logger.stdout.write(chalk.yellow("; defaulting to eslint-plugin-tslint."));
+    logger.stdout.write(chalk.yellow(" (see generated log file); defaulting to eslint-plugin-tslint for these rules."));
     logger.stdout.write(chalk.yellowBright(` 👀${EOL}`));
 
     logger.info.write(


Test patch:
diff --git a/src/reporting/reportConversionResults.test.ts b/src/reporting/reportConversionResults.test.ts
index a536d20..9a239b5 100644
--- a/src/reporting/reportConversionResults.test.ts
+++ b/src/reporting/reportConversionResults.test.ts
@@ -167,7 +167,7 @@ describe("reportConversionResults", () => {
         // Assert
         expectEqualWrites(
             logger.stdout.write,
-            "👀 1 rule does not yet have an ESLint equivalent; defaulting to eslint-plugin-tslint. 👀",
+            "👀 1 rule does not yet have an ESLint equivalent (see generated log file); defaulting to eslint-plugin-tslint for these rules. 👀",
         );
         expectEqualWrites(
             logger.info.write,
@@ -200,7 +200,7 @@ describe("reportConversionResults", () => {
         // Assert
         expectEqualWrites(
             logger.stdout.write,
-            "👀 2 rules do not yet have ESLint equivalents; defaulting to eslint-plugin-tslint. 👀",
+            "👀 2 rules do not yet have ESLint equivalents (see generated log file); defaulting to eslint-plugin-tslint for these rules. 👀",
         );
         expectEqualWrites(
             logger.info.write,
Repository: typescript-eslint/tslint-to-eslint-config
Pull request #441 (2020-05-03 03:59:04)

fix: Missing domain in error messages
<!--
👋 Hi, thanks for sending a PR to tslint-to-eslint-config! 💖
Please fill out all fields below to ensure your PR is reviewed quickly.
-->

## PR Checklist

-   [ ] Addresses an existing issue: fixes #000
-   [ ] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslint/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview

<!-- Brief description of what is changed and how the code change does that. -->


nschonni: Think it may need "tree/master" as well, just double checking
nschonni: Confirmed that there was another piece needed `blob/master/`, and rebased to add it

Patch:
diff --git a/src/reporting/reportConversionResults.ts b/src/reporting/reportConversionResults.ts
index 7f63938..1ec01c2 100644
--- a/src/reporting/reportConversionResults.ts
+++ b/src/reporting/reportConversionResults.ts
@@ -92,7 +92,7 @@ const logPrettierExtension = (logger: Logger) => {
     logger.stdout.write(chalk.red(` to disable formatting ESLint rules.${EOL}`));
     logger.stdout.write(
         chalk.red(
-            `  See https://github/typescript-eslint/tslint-to-eslint-config/docs/FAQs.md#should-i-use-prettier.${EOL}`,
+            `  See https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md#should-i-use-prettier.${EOL}`,
         ),
     );
 };


Test patch:
diff --git a/src/reporting/reportConversionResults.test.ts b/src/reporting/reportConversionResults.test.ts
index 4da981b..383276f 100644
--- a/src/reporting/reportConversionResults.test.ts
+++ b/src/reporting/reportConversionResults.test.ts
@@ -243,7 +243,7 @@ describe("reportConversionResults", () => {
             logger.stdout.write,
             `☠ Prettier plugins are missing from your configuration. ☠`,
             `  We highly recommend running tslint-to-eslint-config --prettier to disable formatting ESLint rules.`,
-            `  See https://github/typescript-eslint/tslint-to-eslint-config/docs/FAQs.md#should-i-use-prettier.`,
+            `  See https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md#should-i-use-prettier.`,
         );
     });
 
@@ -262,7 +262,7 @@ describe("reportConversionResults", () => {
             logger.stdout.write,
             `☠ Prettier plugins are missing from your configuration. ☠`,
             `  We highly recommend running tslint-to-eslint-config --prettier to disable formatting ESLint rules.`,
-            `  See https://github/typescript-eslint/tslint-to-eslint-config/docs/FAQs.md#should-i-use-prettier.`,
+            `  See https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md#should-i-use-prettier.`,
         );
     });
 });
Repository: tlienart/Franklin.jl
Pull request #772 (2021-01-29 15:52:41)

fixes a bug with the link fixer and single-quotes
cc: @kellertuer , thanks for the heads up


Patch:
diff --git a/Project.toml b/Project.toml
index 256a5a9e..7d7cdb3c 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
 name = "Franklin"
 uuid = "713c75ef-9fc9-4b05-94a9-213340da978e"
 authors = ["Thibaut Lienart <tlienart@me.com>"]
-version = "0.10.26"
+version = "0.10.27"
 
 [deps]
 Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
diff --git a/src/converter/html/link_fixer.jl b/src/converter/html/link_fixer.jl
index 1942f3b1..a7b3bff5 100644
--- a/src/converter/html/link_fixer.jl
+++ b/src/converter/html/link_fixer.jl
@@ -79,5 +79,5 @@ function fix_links(pg::String)::String
     pp = strip(prepath, '/')
     ss = SubstitutionString("\\1=\"/$(pp)/")
     # replace things that look like href="/..." with href="/$prepath/..."
-    return replace(pg, r"(src|href|formaction|url)\s*?=\s*?\"?\/" => ss)
+    return replace(pg, PREPATH_FIX_PAT => ss)
 end
diff --git a/src/regexes.jl b/src/regexes.jl
index e366f584..c5791cc5 100644
--- a/src/regexes.jl
+++ b/src/regexes.jl
@@ -145,6 +145,13 @@ with whitespace not to be split.
 """
 const HFUN_PARAMS_PAT = r"([^\s\"']+)|\"([^\"]*)\""
 
+"""
+    PREPATH_FIX_PAT
+
+See [`fix_links`](@ref).
+"""
+const PREPATH_FIX_PAT = r"(src|href|formaction|url)\s*?=\s*?[\"\']?\/"
+
 #= =====================================================
 Pattern checkers
 ===================================================== =#


Test patch:
diff --git a/test/regexes.jl b/test/regexes.jl
index 5c614228..b5bd41a9 100644
--- a/test/regexes.jl
+++ b/test/regexes.jl
@@ -315,3 +315,17 @@ end
     m = match(F.HBLOCK_FOR_PAT, s).captures[1]
     @test_throws F.HTMLBlockError F.check_for_pat(m)
 end
+
+@testset "fix_links" begin
+    F.set_var!(F.GLOBAL_VARS, "prepath", "foo")
+    p = """
+        url='/bar'
+        src="/bar"
+        href=/bar
+        """ |> F.fix_links
+    @test p // """
+        url="/foo/bar'
+        src="/foo/bar"
+        href="/foo/bar
+        """
+end
Repository: tlienart/Franklin.jl
Pull request #795 (2021-03-07 21:05:47)

Fixes for prepath and redirect (#794)


Patch:
diff --git a/Project.toml b/Project.toml
index 4a825f3f..329a2fd8 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
 name = "Franklin"
 uuid = "713c75ef-9fc9-4b05-94a9-213340da978e"
 authors = ["Thibaut Lienart <tlienart@me.com>"]
-version = "0.10.30"
+version = "0.10.31"
 
 [deps]
 Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
diff --git a/src/converter/html/functions.jl b/src/converter/html/functions.jl
index 973b2f95..537b5d78 100644
--- a/src/converter/html/functions.jl
+++ b/src/converter/html/functions.jl
@@ -262,12 +262,13 @@ function hfun_redirect(params::Vector{String})::String
     dst = joinpath(path(:site), addr)
     isfile(dst) && return ""
     mkpath(splitdir(dst)[1])
+    pp = ifelse(FD_ENV[:FINAL_PASS]::Bool, "/$(globvar(:prepath)::String)", "")
     write(dst, """
     <!-- Generated Redirect -->
     <!doctype html>
     <html>
     <head>
-      <meta http-equiv="refresh" content='0; url="$(locvar(:fd_url))"'>
+      <meta http-equiv="refresh" content='0; url="$(pp)$(locvar(:fd_url)::String)"'>
     </head>
     </html>
     """)
diff --git a/src/converter/html/html.jl b/src/converter/html/html.jl
index 4d6a800c..f04e4fa9 100644
--- a/src/converter/html/html.jl
+++ b/src/converter/html/html.jl
@@ -30,11 +30,6 @@ function convert_html(hs::AS)::String
         fhs = find_and_fix_md_links(fhs)
     end
     isempty(fhs) && return ""
-
-    # if FD_ENV[:FINAL_PASS] && !isempty(globvar("prepath"))
-    #     fhs = fix_links(fhs)
-    # end
-
     return String(fhs)
 end
 
diff --git a/src/converter/html/link_fixer.jl b/src/converter/html/link_fixer.jl
index a7b3bff5..21210ba3 100644
--- a/src/converter/html/link_fixer.jl
+++ b/src/converter/html/link_fixer.jl
@@ -77,7 +77,7 @@ function fix_links(pg::String)::String
     prepath = globvar(:prepath)
     isempty(prepath) && return pg
     pp = strip(prepath, '/')
-    ss = SubstitutionString("\\1=\"/$(pp)/")
+    ss = SubstitutionString("\\1=\\2/$(pp)/")
     # replace things that look like href="/..." with href="/$prepath/..."
     return replace(pg, PREPATH_FIX_PAT => ss)
 end
diff --git a/src/regexes.jl b/src/regexes.jl
index c5791cc5..2ad74e9d 100644
--- a/src/regexes.jl
+++ b/src/regexes.jl
@@ -150,7 +150,7 @@ const HFUN_PARAMS_PAT = r"([^\s\"']+)|\"([^\"]*)\""
 
 See [`fix_links`](@ref).
 """
-const PREPATH_FIX_PAT = r"(src|href|formaction|url)\s*?=\s*?[\"\']?\/"
+const PREPATH_FIX_PAT = r"(src|href|formaction|url)\s*?=\s*?([\"\']?)\/"
 
 #= =====================================================
 Pattern checkers


Test patch:
diff --git a/test/regexes.jl b/test/regexes.jl
index b5bd41a9..ea45c843 100644
--- a/test/regexes.jl
+++ b/test/regexes.jl
@@ -324,8 +324,8 @@ end
         href=/bar
         """ |> F.fix_links
     @test p // """
-        url="/foo/bar'
+        url='/foo/bar'
         src="/foo/bar"
-        href="/foo/bar
+        href=/foo/bar
         """
 end
Repository: tlienart/Franklin.jl
Pull request #950 (2022-03-09 22:48:12)

Allow classes like a:b/c with @@
Tailwind CSS (https://tailwindcss.com/) is a perfect match for `@@` but it has a many class names like `hover:basis-1/2` that the parser failed to reconize due to pre-matured end-of-token.
This PR fixes this issue.

tlienart: Nice one, thanks @xukai92, happy to add that, also this should still work fine with 
https://github.com/tlienart/Franklin.jl/blob/43e23a1bbca17fe13c028872e99fe2a0af714fc3/src/converter/markdown/blocks.jl#L39-L40 

so should be good. I'll add a note in the docs and will do a patch release with it. 

Ps: will be good to see what you do with tailwind, do you already have a repo?

Patch:
diff --git a/src/parser/tokens.jl b/src/parser/tokens.jl
index 777af8eb..922d9af8 100644
--- a/src/parser/tokens.jl
+++ b/src/parser/tokens.jl
@@ -253,7 +253,7 @@ In combination with `incrlook`, checks to see if we have something that looks
 like a @@div describing the opening of a div block. Triggering char is a first
 `@`.
 """
-is_div_open(i::Int, c::Char) = (i == 1 && return c == '@'; return α(c, ('-','_', ',', NUM_CHAR...)))
+is_div_open(i::Int, c::Char) = (i == 1 && return c == '@'; return α(c, ('-','_', ',', ':', '/', NUM_CHAR...)))
 
 """
 $(SIGNATURES)


Test patch:
diff --git a/test/parser/1-tokenize.jl b/test/parser/1-tokenize.jl
index d3c277bf..72ade601 100644
--- a/test/parser/1-tokenize.jl
+++ b/test/parser/1-tokenize.jl
@@ -118,7 +118,7 @@ end
         B3
     C
     @@da
-        @@db
+        @@db,dc:dd/de
             E
         @@
     @@
@@ -135,7 +135,7 @@ end
     @test islr(t[6])
     @test istok(t[7], :DIV_OPEN, "@@da")
     @test isind(t[8]) && t[8].lno == 8
-    @test istok(t[9], :DIV_OPEN, "@@db")
+    @test istok(t[9], :DIV_OPEN, "@@db,dc:dd/de")
     @test isind(t[10]) && t[10].lno == 9  # in front of E
     @test isind(t[11]) && t[11].lno == 10 # in front of @@
     @test istok(t[12], :DIV_CLOSE, "@@")
Repository: invenia/NamedDims.jl
Pull request #99 (2020-02-21 12:32:55)

dimnames(A, d)
If `dimnames` is the official way to extract names, then perhaps `dimnames(A, d)` ought to work like `size(A, d)`. 


Patch:
diff --git a/Project.toml b/Project.toml
index ad8fba6..5b814e0 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,7 +1,7 @@
 name = "NamedDims"
 uuid = "356022a1-0364-5f58-8944-0da4b18d706f"
 authors = ["Invenia Technical Computing Corporation"]
-version = "0.2.17"
+version = "0.2.18"
 
 [deps]
 LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
diff --git a/src/name_operations.jl b/src/name_operations.jl
index 6accfbf..0fa0d98 100644
--- a/src/name_operations.jl
+++ b/src/name_operations.jl
@@ -39,9 +39,25 @@ unname(x::AbstractArray) = x
 
 """
     dimnames(A) -> Tuple
+    dimnames(A, d) -> Symbol
 
-Return the names of all the dimensions of the array `A`.
+Return the names of all the dimensions of the array `A`, 
+or just the one for the `d`-th dimension. 
+
+Gives wildcards `:_` if this is not a `NamedDimsArray`.
+Like `size(A, d)`, it allows `d > ndims(A)`, in this case all the trailing dimension are given the wildcard name (`:_`).
 """
-dimnames(::Type{<:NamedDimsArray{L}}) where L = L
+dimnames(::Type{<:NamedDimsArray{L}}) where {L} = L
 dimnames(::Type{<:AbstractArray{T, N}}) where {T, N} = ntuple(_->:_, N)
 dimnames(x::T) where T<:AbstractArray = dimnames(T)
+
+function dimnames(AT::Type{<:AbstractArray{T,N}}, d::Integer) where {T,N}
+    if 1 <= d <= N
+        return dimnames(AT)[d]
+    elseif d > N
+        return :_
+    else
+        throw(DimensionMismatch("dimnames: dimension out of range"))
+    end
+end
+dimnames(x::T, d::Integer) where T<:AbstractArray = dimnames(T, d)


Test patch:
diff --git a/test/name_operations.jl b/test/name_operations.jl
index 260333f..99bf405 100644
--- a/test/name_operations.jl
+++ b/test/name_operations.jl
@@ -5,8 +5,22 @@
     end
 end
 
-@testset "get the names" begin
-    @test dimnames(NamedDimsArray([10 20; 30 40], (:x, :y))) === (:x, :y)
+
+@testset "dimnames" begin   
+    nda = NamedDimsArray([10 20; 30 40], (:x, :y))
+
+    @test dimnames(nda) === (:x, :y)
+    @test dimnames(nda, 2) === :y
+    @test dimnames(nda, 3) === :_
+
+    @test dimnames([10 20; 30 40]) === (:_, :_)
+    @test dimnames([10 20; 30 40], 2) === :_
+    @test dimnames([10 20; 30 40], 3) === :_
+    
+    v = NamedDimsArray(1:2, :a)
+    @test dimnames(v, 2) == dimnames(permutedims(v), 1) # That's why :_ for d > ndims
+
+    @test_throws Exception dimnames(nda, 0)
 end
Repository: hyrodium/BasicBSpline.jl
Pull request #71 (2020-12-30 14:03:51)

bugfix for quintic degree, fix unittests


Patch:
diff --git a/src/_FastBSplineBasis.jl b/src/_FastBSplineBasis.jl
index a8759f4b..16d34a01 100644
--- a/src/_FastBSplineBasis.jl
+++ b/src/_FastBSplineBasis.jl
@@ -187,7 +187,7 @@ Assumption:
 * ``k_{i} ≤ t < k_{i+1}``
 """
 @inline function _bsb5(k::Union{Vector{<:Real},Knots}, t::Real, i::Integer)
-    B = _bsb2(k, t, i)
+    B = _bsb4(k, t, i)
 
     B1 = (k[i+1]-t)/(k[i+1]-k[i-4]) * B[1]
     B2 = (t-k[i-4])/(k[i+1]-k[i-4]) * B[1] +
@@ -219,9 +219,9 @@ end
 end
 
 @inline function _bsplinebasis(P::FastBSplineSpace{4}, t::Real, i::Integer)
-    return _bsb3(P.knots,t,i)
+    return _bsb4(P.knots,t,i)
 end
 
 @inline function _bsplinebasis(P::FastBSplineSpace{5}, t::Real, i::Integer)
-    return _bsb3(P.knots,t,i)
+    return _bsb5(P.knots,t,i)
 end


Test patch:
diff --git a/test/runtests.jl b/test/runtests.jl
index 72feb84c..9bcfee67 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -241,7 +241,6 @@ using Random
         ts = rand(10)
 
         for p in 0:BasicBSpline.MAX_DEGREE
-            p = 2
             P = FastBSplineSpace(p,k)
             for t in ts
                 j = BasicBSpline._knotindex(P,t)